PageLoad:

        if (!IsPostBack)
        {

            ViewState["UrlRef"] = HttpContext.Current.Request.UrlReferrer;
        }

 

ReturnButton:

 protected void btnReturn_Click(object sender, EventArgs e)
    {
        if (ViewState["UrlRef"] != null)
        {
            Response.Redirect(ViewState["UrlRef"].ToString());
        }
        else
        {
            Response.Redirect("~/Index.aspx");
        }

    }

 

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-05-27
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-11-23
相关资源
相似解决方案