ASP.NET: How to "reset" validation after calling Page_ClientValidate
Posted
by Josh Young
on Stack Overflow
See other posts from Stack Overflow
or by Josh Young
Published on 2010-01-13T17:57:01Z
Indexed on
2010/05/06
15:08 UTC
Read the original article
Hit count: 192
I have an ASP.NET page with a jQuery dialog that is displayed to change some data. I am setting up the jQuery dialog so that when the user clicks the OK button it calls ASP.NET's
Page_ClientValidate('validationGroup')
via javascript, finds all the invalid controls and changes their CSS class. So here's the scenario: the user opens the dialog, keys in some invalid data, clicks OK (receiving the validation messages), and then clicks Cancel.
Now the dialog is closed, but the validation messages are still there, so that when they open the dialog again, the data goes back to the way it was initially, but the form is still in the invalid state (the validation messages are still displaying).
What I need is a "reset" function of sorts to call after calling Page_ClientValidate('validationGroup')
. Does this exist?
© Stack Overflow or respective owner