Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

ASP.NET: Find out where a visitor came from

From Wiki

Jump to: navigation, search

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.

  1. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  2.     Response.Write(Request.UrlReferrer.ToString())
  3. 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

495 Rating: 2.3/5 (3 votes cast)