Shivi
Shivi

Reputation: 1085

How to get previous page URL in c#

How to get previous page URL from IE c#..

Request.UrlReferrer" not working in IE

Please help...

Upvotes: 4

Views: 18074

Answers (2)

Filip Cornelissen
Filip Cornelissen

Reputation: 3742

Try 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.

And it should work fine in IE..

Upvotes: 6

C.Evenhuis
C.Evenhuis

Reputation: 26456

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?

Upvotes: 0

Related Questions