I need to reset an ASP.NET form. I am trying to use document.aspnetForm.reset() but then whenever I try to do anything after that I get an event validation error. How can I reset my form without upsetting ASP.NET's Event Validation? I CANNOT turn off event validation. Thanks!
views:
785answers:
2
A:
You will need to clear each form element manually. If you have jQuery you could retrieve all input[@type="text"]
and set their value to ""
and so on for other form elements...
Andrew Hare
2009-07-09 16:18:55
A:
Add return false;
to you javascript code. It will prevent postback.
iburlakov
2009-07-09 16:34:16