C#asp.net 后台代码 返回上一页 后退

ASP.net(c#)做返回上一页效果(后退)--代码

protected void Page_Load(object sender, EventArgs e)
     {
        if (!IsPostBack)
         {
            ViewState["BackUrl"] = Request.UrlReferrer.ToString();
         }
     }
     protected void Button1_Click(object sender, EventArgs e)
     {
        Response.Redirect(ViewState["BackUrl"].ToString());
     }

 


webform