467,888 Members | 1,358 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

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
  • viewed: 1807
Share:
1 Reply
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John Smith | last post: by
4 posts views Thread by Bernie V | last post: by
3 posts views Thread by sorCrer | last post: by
1 post views Thread by JRB | last post: by
5 posts views Thread by Brad Baker | last post: by
2 posts views Thread by John Kotuby | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.