一般的页面返回的方式有3种,客户端返回,服务器端返回(2种)。假如有2个页面 page1.aspx和page2.aspx.在page1.aspx中Response.Redirect("page2.aspx?reurl=page1.aspx");
一 客户端返回:在页面加载中初始化button1,为button1添加属性,代码如下:this.Button1.Attributes.Add("onclick","history.go(-1);return false;");
二 服务器端返回方式1:Response.Write("<script>history.go(-2);</script>");
三 服务器端返回方式2:
String reurl = Request.QueryString["reurl"];
Response.Redirect(reurl);