I have textboxes in a webpage where there are RequiredFieldValidators.
And at the very bottom of these controls are buttons submit and clear
Every time I click the submit button, it triggers the validation from RequiredFieldValidators which is fine.
What I do not want is when I click the clear button the RequiredFieldValidators are also triggered.
here is my code for clear..
txtFullName.Text = null;
txtUserName.Text = null;
txtPassword.Text = null;
txtRetypePassword.Text = null;
CheckList.Items.FindByText("Activated").Selected = false;
CheckList.Items.FindByText("Suspended").Selected = false;
I just want to clear the controls not to validate them everytime I click the clear button.
Thanks 🙂
1 Answer