I have a form with a number of textboxes and dropdownlist .. I have a clear Button which upon clicking is supposed to clear all the fields. But since i have required field validators and regular expressions validator on the form I am not able to fire click event unless all validation are satisfied.
You can use the CausesValidation property
<asp:Button ID="BtnClearForm"
Text="clear form"
CausesValidation="False"
OnClick="BtnClearForm_Click"
runat="server"/>
Another option is to use javascript to clear your inputs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With