ASP.NET 返回上一页面,并重新绑定

此方法并非History.go(-1),因为History.go(-1)方法页面不会重新绑定

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

你可能感兴趣的:(asp.net)