Is there an easy way to reset all the fields in a form?
I have around 100 controls in my asp.net form and there are submit and reset buttons.
How do I make a
You can make use of OnClientClick event. This will reset all all the control present on the form. OnClientClick="this.form.reset();return false;"
OnClientClick
OnClientClick="this.form.reset();return false;"
See the Code :
<asp:Button ID="Reset_Button" runat="server" Text="Reset" Width="81px" OnClientClick="this.form.reset();return false;" />