How to get the previous page's url address under ASP.NET C# code?

  • Thread starter Thread starter ABC
  • Start date Start date
Try

Request.ServerVariables["HTTP_REFERER"];

Note this will not be populated 100% of the time. It's up to the browser to
send this information to the server. And even if it does under normal
circumstances, some paranoia firewall software prevents this data from going
in http requests. More details on the non-reliability here:
http://www.aspfaq.com/show.asp?id=2169

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top