473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Displaying different controls in repeater, depending on condition

I am trying to use a repeater control in an ASP.NET application
(codebehind is C#), to display a bunch of error messages after a
validation has occurred.

In the codebehind, I have access to the type of error (severe or
warning). If the type of error is "warning", I want to display a
checkbox along with the error message. The user can then check this
box to override the error and continue. The checkbox should also be
prefilled with a database value if the user has selected override
before.

If the error is a severe error, this checkbox is not available and it
should only display a text value (something like "n/a").

I'd very much appreciate thoughts for how to do this.
Nov 18 '05 #1
1 1987
You need to inherit your own repeater and implement the ITemplate interface.
Here's a simple example of doing that. It is what I used as a starting
point for the custom repeater in the project I am working on now.

http://coltkwong.com/blogs/juliet/posts/467.aspx

Dale

"Shari" <sf*****@hotmail.com> wrote in message
news:ee************************@posting.google.com ...
I am trying to use a repeater control in an ASP.NET application
(codebehind is C#), to display a bunch of error messages after a
validation has occurred.

In the codebehind, I have access to the type of error (severe or
warning). If the type of error is "warning", I want to display a
checkbox along with the error message. The user can then check this
box to override the error and continue. The checkbox should also be
prefilled with a database value if the user has selected override
before.

If the error is a severe error, this checkbox is not available and it
should only display a text value (something like "n/a").

I'd very much appreciate thoughts for how to do this.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Smith | last post by:
How do I use two different data types with a conditional operator ? I want to cout either a character or an integer depending on a certain condition. cout << ((IsThisTrue? char:integer) The...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
4
by: Bernie V | last post by:
Hi group, Is it possible to use a condition in a repeater control ? I 'd like to use a condition to create this <a href='<%#DataBinder.Eval(Container.DataItem,"nieuwsid")%>.aspx'> part of the...
3
by: sorCrer | last post by:
Hi All, Posted after extensive searching! I have a nested repeater control as follows: (Simplified ;-)) <table> <asp:repeater id=parent onItemDataBound=createChild> <tr><td>Level...
1
by: JRB | last post by:
Hi, I have a table stored in a database called "Compare" with three columns. The first column is the CompareID (it is an auto increment integer), the second is "Person1", and the third is...
5
by: Brad Baker | last post by:
I'm completely new to ASP.NET programming, so please accept my apologies in advance for asking what is probably an obvious question. :-) I'm trying to write a page which will display the...
2
by: John Kotuby | last post by:
Hi all, I have a page that displays the contents of a business document in HTML that uses multiple select queries to provide the relevent data. There is a call to the parent table and then...
4
by: Michael | last post by:
I have a repeater web control. Currently I want to change some row's color based on defined condition. Is there any code sample demonstrating how to accomplish it? Thanks.
1
by: Jeff | last post by:
hi asp.net 2.0 On my webpage I want to display a list of images. Most proparly display the list horizontal Sometimes I want only one image to be displayed and sometimes maybe 10 images....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.