ValidationSummary - error message in reponse to exception

G

Guest

Is there a way to include in a ValidationSummary an error message that says that an exception was thrown or that an if/else test went to 'else' ?
 
P

Peter Blum

The ValidationSummary only shows the errors from validators. It doesn't
appear unless at least one validator has its IsValid property set to false.

So create a custom validator whose server side evaluation function
determines these issues and sets ErrorMessage to the text that you want to
say. You can also set the IsValid and ErrorMessage properties manually after
the validation function runs, such as in response to catching an exception
or running if/else.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

mg said:
Is there a way to include in a ValidationSummary an error message that
says that an exception was thrown or that an if/else test went to 'else' ?
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top