ASP.NET Button to redirect to another page

后端 未结 4 641
萌比男神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

    You can use PostBackUrl="~/Confirm.aspx"

    For example:

    In your .aspx file

    or in your .cs file

    btnConfirm.PostBackUrl="~/Confirm.aspx"

提交回复
热议问题