Request.currentexecutionfilepath; The virtual path for the current request is this format:/virtual directory name/admin/index.aspx
Request.applicationpath//Gets the virtual application root path of the ASP.net application on the server. /virtual directory name (application name)
These are the file paths in the virtual directory, which is the path in IIS. To get the real physical path is to be added on the basis of the above path:
Server.MapPath (Request.applicationpath + "splconfig/classmap.xml")//This may have a bug
It's better that way.
String M_applicationpath=request.applicationpath;
if (this.m_applicationpath== "")
This.m_applicationpath= "/";
if (!this.m_applicationpath.endswith ("/"))
This.m_applicationpath + = "/"; Let's judge for a moment.
Server.MapPath (m_applicationpath+ "Splconfig/classmap.xml")
2005 new access Methods for address URLs
This. Request.currentexecutionfilepath; The path in the virtual busy of the current request
This. Request.filepath; Paths in the virtual directory
This. Request.PhysicalPath; The physical path of the current request
This. request.physicalapplicationpath;//the physical path of the application
This. request.url.absoluteuri;//all URLs
Request.rawurl get URL with variable request.urlreferrer get URL without variable
How to refresh this page:
This. Response.Redirect (this. Request.Url.AbsoluteUri, True);
This. Response.Redirect (this. Request.Url.ToString ());
Refreshing of custom methods
This. Response.Redirect (this. Request.currentexecutionfilepath + "depid=" + this.hDepID.Value.ToString ());
Note: Original from: http://blog.csdn.net/szwangdf/archive/2007/05/08/1600480.aspx