Set current page full address is: http://www.cnblogs.com/trvatwang/p/4463026.html?id=xxx
"/HTTP" is the protocol name
"Www.cnblogs.com" is the domain name
"Trvatwang" is the station name.
"4463026.html" is the page name (file name)
"Id=xxx" is a parameter
1. Get the full URL (protocol name + domain + site name + file name + parameters)
string url=Request.Url.ToString (); URL= http://www.cnblogs.com/trvatwang/p/ 4463026.html?id=xxx
2. Get Site name + page name + parameters
string url=string// can also be used in this way url=/trvatwang/p/4463026
3. Get Site name + page name
string url=string url= HttpContext.Current.Request.Path; // url=/trvatwang/p/4463026. html
4. Get the domain name
string url=HttpContext.Current.Request.Url.Host; URL= www.cnblogs.com
5. Get Parameters
string url= HttpContext.Current.Request.Url.Query; URL=? id=xxx
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 various properties of the current URL (protocol name, domain name, site, page, etc.)