Author: Aania | Posted on: 3/2/2010 8:39:16 AM | Views : 482

Hi there,
I've created a site that uses Vlidation and RequiredField controls, and this is the first time I've implemented them.
How do I catch the errors in code at the time of Submit?  At the moment, I have a simple form with text fields, and I added a Submit button, that fires an event that does nothing but Response.Write("Submitted").
I was surprised to find that on clicking the Submit button, even with empty fields, it would write "Submitted" to the page, even though on the PostBack all the error messages were correctly showing up. So, how do I check to see if there were errors so that I can disallow that code to execute? (I kind of expected that it would magically happen automatically, and just not allow any other code to fire until those Validators were clear.)
Thanks,
Aania

...

Go to the complete details ...