Asp.net regularexpressionvalidator fires even when CausesValidation="false"

Posted by Rohit on Stack Overflow See other posts from Stack Overflow or by Rohit
Published on 2010-03-25T15:27:37Z Indexed on 2010/03/25 15:33 UTC
Read the original article Hit count: 268

Filed under:

I have a regularexpression validator which validates a valid email. I have two buttons on my form. Submit and undo.

On undo, we are reverting the page state to default

submit has it validationgroup set while undo doesnot have any validationgroup and CausesValidation="false".

Now when i navigate to page and enter invalid emailaddress,i directly click undo. the validator fires and stops my page from posting.however if i press tab and navigate to other control and then click undo,the validator shows error message but posts back and furthur proessing is done.

This is very strange and i want the page to postback without any error message when i click undo.how to achieve it.

© Stack Overflow or respective owner

Related posts about ASP.NET