当前页面操作后 ,脚本执行  window.location.href ="a.aspx";  
但是 ,到了 a.aspx页面后,page_load中 ,需要Request.UrlReferrer取得从哪跳转的,脚本跳转的就取不到,怎么样取的呢?  或,怎么才能用脚本跳转时赋进去url呢?

解决方案 »

  1.   

    window.location.href ="a.aspx";  脚本设置的跳转是取不到的你可以这样<a>这样定义<a href='a.aspx' id='go'></a>window.location.href ="a.aspx";  
    的地方变成document.getElementById('go').click();
      

  2.   

    window.location.href ="a.aspx?url=" + window.location.href; 把当前地址传过去的
    或执行一个按钮事件,这个按钮事件里面转到其他页面的
    document.getElementById("btnid").click();
      

  3.   

    Request.UrlReferrer取不到的,在跳转前加参数. 
    string  strLastURL="";  
    string  strCurURL="";  
    strLastURL=Request.ServerVariables["HTTP_REFERER"].ToString(); //页面来源  
    strCurURL=Request.RawUrl.ToString();  //当前页面
      

  4.   

    strLastURL=Request.ServerVariables["HTTP_REFERER"].ToString(); //页面来源顶---------------------------
    无忧统计(www.51stat.net)--------打造强大的网站流量统计系统
                 _      _    
                <')_,/ <') ,/
                (_==/  (_==/
                 ='-    ='-