I want to disable required validator field for a specific button click which is not check only a textbox. i've tried this code in the button click but not worked. so need this type of code how solve.
protected void Button3_Click(object sender, EventArgs e)
{
if (TextBox1 == null)
{
RequiredFieldValidator1.EnableViewState = false;
}
}
EnableViewStatehas nothing to do with validation andTextBox1 == nullwill never be true if it existsValidatorGroups, this button gets a different group than the RequiredFieldValidator, voila.