Myaya
Myaya

Reputation: 7

Asp.net Validations and controls

how to disable the (Required attribute) in Text box in ASP.NET web forms I want to change the web form page to another one when I click on the Login button but I cant! please help!

Upvotes: 0

Views: 37

Answers (1)

RezaGhahari
RezaGhahari

Reputation: 413

For Disable Validation :

<asp:TextBox id="txt" runat="server"  causesvalidation="false" />  // or reqiured=false

For Redirect :

protected void btnConfirm_Click(object sender, EventArgs e)
{
Response.Redirect("YourPage.aspx");
//or
Server.Transfer("YourPage.aspx");
}

Upvotes: 2

Related Questions