clear validation messages on client

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. How do you clear all validation errors in javascript? I want to do
this because I have a clear button which I use javascript to run a function
to clear all the fields. However, it won't clear any error messages if there
are any. Do you know how to do this?

Thank you,
 
The Microsoft validators do not handle this automatically on the client
side. You must make your button post back to the server side and set its
CausesValidation property to false. This way, the page will regenerate but
will not display any validation errors (because the button doesn't call
Page.Validate()).

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top