gciochina
gciochina

Reputation: 1201

Check from where an ASP.Net page in my application was opened?

Searched everywhere but couldn't find anything.

My question is: is it possible to programmatically determine the address of the site from where a page in my ASP.Net application was opened (either from client code or server code)?

Suppose i have a big job board application, some of the jobs are listed in Google. How can one tell if the page was opened directly from the application, or from an external source like search engines/ etc (i.e. did someone click a link in Google and got here?).

Thanks!

Upvotes: 0

Views: 139

Answers (1)

Jamiec
Jamiec

Reputation: 136144

You're looking for

Request.ServerVariables["HTTP_REFERER"]

Upvotes: 4

Related Questions