LearnFast.Ninja

ASP.NET get URL with querystring

This tutorial will show you how to get the current URL with query string variables.

Main idea:
Url.PathAndQuery

Code Examle:
string Current_Url = HttpContext.Current.Request.Url.PathAndQuery;

Result:
/Test.aspx?id=502

Tags

asp.net

url querystring query-string pathandquery path query current-url