用javascript的history.go(-1),但有时侯会有问题,还是尽量少用~

解决方案 »

  1.   

    基本是用javascript,别的办法到是还没想到过
      

  2.   

    搞定了,代码如下:
    <a href=<%=request.serverVariables("Http_REFERER")%> >
        <asp:image ID="imgcancel"  Visible="false" 
        ImageUrl="images/cancel.GIF" 
        AlternateText="取消当前操作"  runat="server" />
    </a>
      

  3.   

    在页面文件中找个位置加入:
    <input type="button" onclick="javascript:window.history.go(-1);" value="go back">
      

  4.   

    同意楼上的观点,
    只能用java 。
    你可以用跳转语句设定一个页面
      

  5.   

    与java无关,用VBScript照样工作,也照样出问题.
    在Frames中,经常搞到主Frams页不见了,成了仅有顶头上的一个Frame.
    直接用IE上的后退按钮,却无此问题.
    应该如何办?
      

  6.   

    用一个linkbutton
    在pageload事件中加上: 
    Dim strResponse As String
            '--得到指向的地址
            strResponse = "<script language='Javascript'>function goandfind() {window.parent.document.location.href ='../Transform/Import1.aspx';} </script>"
            Response.Write(strResponse)
            btn_Back.Attributes.Add("onmousedown", "goandfind()")
      

  7.   

    in one example application of microsoft,(i forgot the name)
    using the following method
    in Page_Load
    if (!IsPostBack)
    {
    ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();
    }for go back button click
    private void btnGoBack_Click(object sender, System.EventArgs e)
    {
           Response.Redirect((String) ViewState["UrlReferrer"]);
    }The problem is in some cases, Request.UrlReferrer will be null if you use firewall
      

  8.   

    如果用
    <input type="button" onclick="javascript:window.history.go(-1);" value="go back">
    这种方法我无法控制botton的可视性,所以我还是用
    <a href=<%=request.serverVariables("Http_REFERER")%> >
        <asp:image ID="imgcancel"  Visible="false" 
        ImageUrl="images/cancel.GIF" 
        AlternateText="取消当前操作"  runat="server" />
    </a>
    这样同时可以实现隐藏button和返回上一页功能
      

  9.   

    在页面文件中找个位置加入:
    <input type="button" onclick="javascript:window.history.go(-1);" value="go back">
    or history.back()