工作,我有兩個頁面分別www.abc.com/pg1.aspx
和www.abc.com/pg2.aspx
URL引用站點不是彈出窗口
pg1.aspx
response.redirect("www.abc.com/pg2.aspx");
pg2.aspx
string url_refer = Request.UrlReferrer.ToString();
UrlReferrer
工作正常。
pg1.aspx
<a href='#' onclick=\"window.open('www.abc.com/pg2.aspx', 'windowname2', 'width=1014, height=709, screenX=1, left=1, screenY=1, top=1, status=no, menubar=no, resizable=no, toolbar=no'); return false;\">
pg2.aspx
string url_refer = Request.UrlReferrer.ToString();
UrlReferrer
是NULL
我GOOGLE的溶液。但他們都沒有導致我想要的解決方案。
我的問題是,如果窗口是沒有菜單欄,狀態或工具欄,UrlReferrer
是NULL
如果不是,UrlReferrer
有以前的頁面的URL。我也試過url_refer = Request.ServerVariables["HTTP_REFERER"].ToString();
而不是string url_refer = Request.UrlReferrer.ToString();
。
結果是一樣的。
任何解決方案?