如题,但是不能使用以下方法
1〉Request.UrlReferrer;
2〉window.history.go(-1);
3> window.history.go(-2);
4> window.history.back(-1);除了这些在Asp.Net中还有别的方法吗?
如果有,请赐教,谢谢。
1〉Request.UrlReferrer;
2〉window.history.go(-1);
3> window.history.go(-2);
4> window.history.back(-1);除了这些在Asp.Net中还有别的方法吗?
如果有,请赐教,谢谢。
可以在每个页面跳转的时候将当前页面的内容存入cookie中,在下一个页面去取出此cookie的值并销毁此cookie
我断点调试Request.ServerVariables[]中根本没"HTTP_REFERER"这个key
[Visual Basic]
Dim MyUrl As Uri = Request.Url
Response.Write("URL Port: " & MyUrl.Port & "<br>")
Response.Write("URL Protocol: " & MyUrl.Scheme & "<br>")
[C#]
Uri MyUrl = Request.Url;
Response.Write("URL Port: " + MyUrl.Port + "<br>");
Response.Write("URL Protocol: " + MyUrl.Scheme + "<br>");
而此时点返回就不正确了,我用的是
ViewState["backUrl"]=Request.UrlReferrer;方法。
该怎么解决,既不重复提交又可以正确返回到上一页?