history.go(-1); 页面A 链接到页面B 然后直接点击返回 执行 前面的返回可以实现。 如果页面b有按钮,我点击一下按钮 然后点击返回就不能返回到 页面A了。请大家帮忙。我直接把参数改为 -2 也不能回到A  在线等。高手们来。

解决方案 »

  1.   

    在B页面点按钮,页面就回发了,所以上一页还是在A了。
    还是老老实实的用window.location.href='A.aspx';另外不喜欢这个标题,一点都不超级复杂,这只是一个基础的问题。
      

  2.   

    在B页面点按钮,页面就回发了,所以上一页还是在B了。 
    还是老老实实的用window.location.href='A.aspx'; 
      

  3.   

    window.location.href =‘页面’ 这个确实可以,但是页面A 之前查询出来的数据就不存在了。我需要的是:返回后上次查询的结果还存在。
      

  4.   

    window.location.href='A.aspx'还是用这种方法吧!!
      

  5.   

    按钮上的代码怎么写的呢?
    <a onclick="javascript:history.back();">Back</a>
    是这样吗?
      

  6.   

    自己解决问题:结贴!
    public int ReturnCount
        {
            get
            {
                if (ViewState["returnCount"] == null)
                    ViewState["returnCount"] = 0;
                return (int)ViewState["returnCount"];
            }
            set { ViewState["returnCount"] = value; }
        }
        #endregion    protected void Page_Load(object sender, EventArgs e)
        {
            ReturnCount--;
            if (!this.IsPostBack)
            {}
         }<a onclick="javascript:history.go(<%=ReturnCount %>)" href="#" class="cssa">返回</a>