Click here to Skip to main content
15,909,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
friends, i need to know the reference URL from which a person comes to my site. for example: i have a site named : www.abc.com if a person finds this link www.abc.com by searching on google.com then i want this information that the person is coming from google.com i have to maintain the reference URLs. i m working in ASP.net with c#. i will apperciate if someone give me any idea to work on.
thanking u.
Posted

1 solution

Hi,

Use Request.UrlReferrer:
http://msdn.microsoft.com/en-us/library/system.web.httprequest.urlreferrer.aspx[^]
This method returns a System.Uri:
http://msdn.microsoft.com/en-us/library/system.uri.aspx[^]
Use the Uri.ToString method to get the string representation of the Uri:
http://msdn.microsoft.com/en-us/library/system.uri.tostring.aspx[^]
 
Share this answer
 
Comments
RaisKazi 20-May-13 13:26pm    
Good Information.
Thomas Daniels 20-May-13 13:28pm    
Thank you!
Thanks7872 21-May-13 0:36am    
↑voted...Tremendous.!
Thomas Daniels 21-May-13 12:48pm    
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900