Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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!

(如何在ASP.NET Web表单的文本框中禁用(必填属性)我想在单击“登录”按钮时将Web表单页面更改为另一页面,但是我不能!)

please help!

(请帮忙!)

  ask by Myaya translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
164 views
Welcome To Ask or Share your Answers For Others

1 Answer

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");
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...