.NET Tips and Tricks

Blog archive

Progressive Server-side Validation by Group in ASP.NET

I didn't know this until my fellow instructor at Learning Tree (and author of Learning Tree's ASP.NET Web Forms course), Kevin Rattan, pointed it out to me: when you trigger validation at the server by calling the Validate method, you can pass the name of a Validation Group to the method. When you do, only those Validators you've assigned to that group (through the Validators' ValidationGroup property) will execute.

This allows you to check parts of your page for problems, and if you find a problem, skip validating the rest of the page. If you're using the UpdatePanel, you can trigger validation just for the controls in the panel that was posted back to the server.

Posted by Peter Vogel on 01/31/2014 at 7:45 AM


comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.