ASP.NET button click event still firing even through custom server-side validation fails

Posted by Josh on Stack Overflow See other posts from Stack Overflow or by Josh
Published on 2010-05-27T18:46:55Z Indexed on 2010/05/27 19:01 UTC
Read the original article Hit count: 159

Filed under:
|

I am having a problem where my button click event is still firing even though my custom server-side validation is set to args.IsValid = false. I am debugging through the code and the validation is definitely being fired before the button click, and args.IsValid is definitely being set to false once the custom validation takes place, but it always makes its way to the button click event afterwards. Any ideas on why this is?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about validations