[Asp.net] Get current Page URL absolute URI and query string parameters.

[Asp.net] Get current Page URL absolute URI and query string parameters.

Here we will see how to get current page URL, absolute URI and query string parameters. we will use below URL.


protected void Page_Load(object sender, EventArgs e)
     string currentPageURLis = Request.Url.ToString();
     Response.Write("Fully qualified Current Page URL is: " + currentPageURLis);
     string absoluteUri  = Request.Url.AbsoluteUri;
     Response.Write("Absolute uri is: " + absoluteUri);
     string queryString = Request.Url.Query;
     Response.Write("Query String Is: " + queryString);


Fully qualified Current Page URL is: http://localhost:3716/web.Demo/Jquery_Tutorials.aspx?user=satalaj&lastName=More
Absolute uri is: http://localhost:3716/web.Demo/Jquery_Tutorials.aspx?user=satalaj&lastName=More
Query String Is: ?user=satalaj&lastName=More 


Request.Url.Tostring() returns fully qualified URL of requested page.

Request.Url.AbsoluteUri property returns absolute url (exclude domain name).

Request.Url.Query property returns all query string parameters as string.


How to Pass To Query String In Asp.netAsp.net Urldecode QueryStringAsp.net Convert String To ImageC# DateTime ToString()Jquery Trim Stringasp net image upload.net String vs stringJquery Get Target Of EventAsp.net UrlPathEncodeASp.net 2.0 step by step Membership Provider How to get Jquery selected option


My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.

I'm Satalaj.