Reputation: 559
As we all know the HttpApplication object holds objects regarding the requested page (HttpRequest) and the page where we are supposed to be redirected (HttpResponse); I need to get the url of the page which requested the page; how could I get it from the HttpApplication ?
Upvotes: 0
Views: 899
Reputation: 7759
You need to use the HttpRequest.UrlReferrer property see - http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx
Upvotes: 0
Reputation: 30922
You want to check the url referrer header like so:
string MyReferrer = Request.UrlReferrer.ToString();
This value is set by the browser however - so can't exactly be trusted from a security viewpoint.
Upvotes: 2