Click here to Skip to main content
16,016,562 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I want to get complete url of previous page like i am visiting to codeproject(http://www.codeproject.com)by searching codeproject on google having url as "https://www.google.co.in/?gfe_rd=cr&ei=NLpGU_j8IeSL8QfckoGIDw#q=code+project".
I want to display this google absolute url on my page.

I have got the url but not absolute url as https://www.google.co.in/?gfe_rd=cr&ei=NLpGU_j8IeSL8QfckoGIDw#q=code+project.
The code used by me:
C#
Uri MyUrl = Request.UrlReferrer;
        Response.Write("Referrer URL : " + Server.HtmlEncode(MyUrl.ToString()) + "<br>");
        Response.Write("Referrer URL Port: " + Server.HtmlEncode(Request.Url.AbsoluteUri.ToString()) + "<br>");
        Response.Write("Referrer URL Protocol: " + Server.HtmlEncode(MyUrl.Scheme) + "<br>");
        Response.Write("Referrer IP: " + ClientIPAddress() + "<br>");

Thanks in advance.
Posted
Updated 14-Apr-14 23:41pm
v2

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