Wednesday, 21 November 2007

Some useful ASP.Net URL Path code

System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath
-Gets the root virtual path of the application

Request.AppRelativeCurrentExecutionFilePath
- Relative path with ~/

Request.CurrentExecutionFilePath
- The virtual path of the current request

Request.ApplicationPath
- The virtual path of the current application.

Request.FilePath
- The virtual path of the current request.

Request.Path
- The virtual path of the current request.

Page.ResolveUrl
- Converts that is useful for requesting from client.