The
VirtualPathUtility class provides utility methods for common operations involving virtual paths. For ASP.NET server controls and server code, virtual paths using the Web application root operator, the tilde (~), commonly are used instead of relative and absolute paths
http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx
几个有用的方法:
GetDirectory Returns the directory portion of a virtual path.
GetExtension Retrieves the extension of the file that is referenced in the virtual path.
GetFileName Retrieves the file name of the file that is referenced in the virtual path.
http://msdn.microsoft.com/en-us/library/system.web.virtualpathutility.aspx
几个有用的方法:
GetDirectory Returns the directory portion of a virtual path.
GetExtension Retrieves the extension of the file that is referenced in the virtual path.
GetFileName Retrieves the file name of the file that is referenced in the virtual path.