ASP.NET Button to redirect to another page

后端 未结 4 638
萌比男神i
萌比男神i 2020-12-05 10:08

How do I code the button such that when I click the button and it brings me to another web form? Let\'s say the button name is Confirm and the wed form is confirm.aspx ?

4条回答
  •  长情又很酷
    2020-12-05 10:16

    u can use this:

    protected void btnConfirm_Click(object sender, EventArgs e)
    {
      Response.Redirect("Confirm.aspx");
    }
    

提交回复
热议问题