ASP.NET: Find out where a visitor came from
From Wiki
Summary: Find out where a visitor came from
If you want to track which page or site a user has come from, you can use the referrer information. This is located in the Request.UrlReferrer object e.g.
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Response.Write(Request.UrlReferrer.ToString())
- End Sub
Caution: you may find that this is not 100% reliable as users can tell their browser not to send the referrer or they can even alter it so only use this if you are aware of this.
This Hack is part of the ASP.NET Hacks collection


