Clearing control values in a page without postback from the server ASP.NET

eryk57A5

New Member
I have textboxes in a webpage where there are RequiredFieldValidators.And at the very bottom of these controls are buttons submit and clearEvery 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..\[code\] txtFullName.Text = null; txtUserName.Text = null; txtPassword.Text = null; txtRetypePassword.Text = null; CheckList.Items.FindByText("Activated").Selected = false; CheckList.Items.FindByText("Suspended").Selected = false;\[/code\]I just want to clear the controls not to validate them everytime I click the clear button.Thanks :)
 
Back
Top