I am working on a web application, I came to a situation that I need to know from which website the user came to my website. What I am looking for is:
<a target="_blank" href="http://localhost:18835/index.aspx">To Web application</a>
is on one website say StackOverflow and on that index.aspx
page load I need to know that the request is coming from StackOverflow or any other website I need to know the URL where the page request is made.
How can I do that?
string referencepage = HttpContext.Current.Request.UrlReferrer.AbsoluteUri;
label1.Text = "You Came from:-" + referencepage;
this code will work when the request is made within the current URL, so what if the request is coming from outside ???