我想在单击“后退”时 网页不后退 该怎么做啊 
具体的代码怎么写啊

解决方案 »

  1.   

    Response.Buffer=true;
    Response.ExpiresAbsolute=DateTime.Now.AddSeconds(-1);
    Response.Expires=0;
    Response.CacheControl="no-cache";
      

  2.   

    是否用了AJAX?
    AJAX读取的数据就不会被浏览器记录
      

  3.   

    Response.CacheControl="no-cache";不保存页面缓存
      

  4.   

    捕获用户的浏览器后退事件,然后JS中
    history.go(-1)
      

  5.   

    protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
            Response.Expires = 0;
            Response.CacheControl = "no-cache";
        }
    这样吗?好像不行啊!
      

  6.   

    <script>location.href="指向页面"</script>
      

  7.   

    http://blog.sina.com.cn/s/blog_54eeb5d90100cls3.html
      

  8.   

    ++

    比如:客户端A -> B ,你不想让客户端Goback到 A 上,
    A就不能有客户端缓存。
    A的Page_Load 加上面的代码。
      

  9.   

    楼主的意思,是不是说:在管理后台点退出系统后转到登录页,这时再单击后退,不让他返回到管理后台是吧? 
    我是这样设计的:
    退出系统转到LoginOut页面,这个页面就是清除Session,然后转向登录页, 你再点后退就还是会到登录页了。
      

  10.   

    不是这样的,我是想让http://hi.csdn.net/attachment/201106/22/10024661_130872233697Ad.jpg
    这个功能不起作用
      

  11.   

    你是说Session吗
    不知道怎么用
      

  12.   

    <script>location.href="指向页面"</script>
    所以跳转都用这个不行?
      

  13.   

    aa.aspx.cs
    Response.Write("<script>location.href=\"bb.aspx\"</script>");你从aa.aspx指向bb.aspx后,还能返回aa.aspx?
      

  14.   

    要后退的页面上加上
    <script  language="JavaScript">    
    <!--    
    javascript:window.history.forward(1);    
    //-->    
    </script>   
      

  15.   

    后退有很多方法。
    比如:window.back()
         history.go(-1);
         loaclf.href='后退的网页'
      等等。。
      

  16.   

        <script type="text/javascript"> 
       window.history.forward(1);
    </script>
      

  17.   

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
                <script type="text/javascript">  
      window.history.forward(1);
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>    </div>
        </form>
    </body>
    </html>
    这样吗?好像不行啊
      

  18.   

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
                <script type="text/javascript">  
      window.history.forward(1);
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>    </div>
        </form>
    </body>
    </html>
    这样吗?好像不行啊
      

  19.   


    用go和forward有什么区别啊
      

  20.   

    搞不明白go和forward有什么区别啊