简体   繁体   English

如何在c#中获取上一页网址

[英]How to get previous page URL in c#

How to get previous page URL from IE c#.. 如何从IE c#获取以前的页面URL

Request.UrlReferrer" not working in IE

Please help... 请帮忙...

Try Request.ServerVariables["HTTP_REFERER"] 试试Request.ServerVariables["HTTP_REFERER"]

But Request.UrlReferrer gets his data there too, so if the value isn't set in that variable, there is no way to get it. 但是Request.UrlReferrer也在那里获取他的数据,所以如果没有在该变量中设置该值,则无法获取它。

And it should work fine in IE.. 它应该在IE中正常工作..

Browsers don't always send the referrer, so you can't rely on having access to that information. 浏览器并不总是发送引荐来源,因此您不能依赖访问该信息。

See the answer for Does http-equiv="refresh" keep referrer info and metadata? 请参阅http-equiv =“刷新”保留引用者信息和元数据的答案吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM