Perform secondary validation on the form
I am using asp.net webforms. FROM#
I want to validate a form. In codebehind im just execute if (Page.isValid).
Once the form fields are correct, I want to perform another validation. The reason I want this split is because it really costs money to do this check, so I only want to do it after all the fields are valid.
Can I programmatically add a validation error to the validation summary? after checking Page.isValid?
Not sure how to solve this.
Any suggestions are greatly appreciated.
a source to share
If you're interested in a little more control over validation, you should look at FluentValidation . It is a very powerful and intuitive alternative to standard web form validation, and you can strip attributes of your DTO classes. It also works great in tandem with jQuery validation.
a source to share