ValidationSummary reuse

J

Jeronimo Bertran

I have a we page that uses Validators and a ValidationSummary to show the
results. However, after all input fields are verified I do additional
verification on the server side and if there was a problem that cannot be
determined by the validators I show the error in much the same way as the
validators do. Can I use the same ValidationSummary control to display a
validation error in this case?

Thanks

Jeronimo
 
K

Kevin Yu [MSFT]

Hi Jeronimo,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
S

Steven Cheng[MSFT]

Hi Jeronimo,

Welcome to ASPNET newsgroup. From your description, the problem you met is
how to reuse the ValidatioSummary control to display error message when
your custom validation operations complete at serverside, yes?

From my research, the ValidationSummary control is tightly bind with the
asp.net validation controls , there is no exsiting interfaces to manually
invoke its displaying. However, we can make use of the CustomValidator
conttrol which can help do our custom validation operatios( in its
"ServerValidate" event).
So we can add a custom validation control on the page(turn off client
validation) and put our own validation
code in "ServerValidate" event. When the validation fails, just set the
ServerValidateEventArgs.IsValid to "false", the ValicationSummary will
displaying the error message of the CustomValication control.

HTH. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
J

Jeronimo Bertran

Steven, thanks... this will work fine.

Jeronimo

(e-mail address removed) (Steven Cheng[MSFT]) wrote in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top