Set current page full address is: Http://www.jb51.net/aaa/bbb.aspx?id=5&name=kelli
"/HTTP" is the protocol name
"Www.jb51.net" is the domain name
"AAA" is the station name.
"Bbb.aspx" is the page name (file name)
"Id=5&name=kelli" is a parameter
"1" gets the full URL (protocol name + domain + site name + file name + parameter)
string url=Request.Url.ToString (); URL= http://
"2" gets the site name + page name + parameters:
string url=string url=Request.Url.PathAndQuery;) url=/aaa/bbb.aspx?id=5
"3" Get Site name + page name:
string url=string url= HttpContext.Current.Request.Path;) URL
"4" Gets the domain name:
string url=HttpContext.Current.Request.Url.Host; URL
"5" gets the parameter:
string url= HttpContext.Current.Request.Url.Query; URL=? id=5
Request.rawurl: Gets the URL information for the client request (not including the host and port)------>/default2.aspx Request.applicationpath: Gets the virtual path of an ASP. NET application on the server. ------>/ Request.currentexecutionfilepath: Gets the virtual path of the current request. ------>/default2.aspx request.path: Gets the virtual path of the current request. ------>/default2.aspx request.pathinfo: Take additional path information for a resource with a URL extension ------> Request.PhysicalPath: Gets the physical file system path that corresponds to the requested URL. ------>E:\temp\Default2.aspx Request.Url.LocalPath:------>/default2.aspx Request.Url.AbsoluteUri:------>http://
ASP. NET gets the code for the various properties (file name, parameter, domain name, etc.) of the current URL URL