views:

785

answers:

2

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!

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
A: 

Add return false; to you javascript code. It will prevent postback.

iburlakov