Here's how:
Request.Url.ToString () Get the full Url (protocol name + domain + site name + file name + parameter): https://localhost:44300/webform1.aspx?abc=123Request.rawurl get URL information for client requests (not including host and port):/webform1.aspx?abc=123Request.Url.AbsolutePath Get Site name+ page Name:/WebForm1.aspxRequest.Url.Host Get host part: LocalhostRequest.Url.Query Gets the parameters section:? abc=123Request.applicationpath Get the application's virtual application root path:/Request.currentexecutionfilepath Gets the virtual path of the current request:/WebForm1.aspxRequest.Path Gets the virtual path of the current request:/WebForm1.aspxRequest.PathInfo Get additional path information for a resource with a URL extension: Request.PhysicalPath Gets the physical file system path that corresponds to the requested URL: c:\users\jim\ Documents\Visual Studio .\projects\webapplication3\webapplication3\webform1.aspxrequest.url.localpath Gets the local operating system representation of the file name:/WebForm1.aspxRequest.Url.AbsoluteUri Get absolute Url:https://localhost:44300/webform1.aspx?abc=123Request.ServerVariables.Get ("local_addr") Get server IP::1Request.Url.Port Get the server port:44300Request.Url.Scheme Get Server protocol header: HTTPS
ASP. NET Get URL method