Re: Displaying a message contigent on another validator.

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Andrew Jones (ajones_at_kvmhc.org)
Date: 07/01/04


Date: Thu, 1 Jul 2004 15:57:18 -0400

Try ValidationSummary.
I believe this is designed exactly for this purpose.
(Only been coding .NET for 1 week now though)
:-)

AJ
"darrel" <notreal@hotmail.com> wrote in message
news:%23PwGJQ6XEHA.2456@TK2MSFTNGP10.phx.gbl...
> I'm using some validators for a form. If the field is invalid, the page
> reloads with the error next to the field.
>
> This works, and I like it.
>
> I'd also like to add a separate message to the top of the page along the
> lines "there appears to be an error with your submission. Please check the
> form below. Items to correct appear in RED".
>
> What would be the best way to do this? I was thinking that I could just
wrap
> it in a panel and set it to visible/hidden based on the validators. Is
there
> a way to check for ANY validator error? Something like:
>
> if any validator = error, then panel.visibility = true
>
> -Darrel
>
>



Relevant Pages