Finding the Virtual path of the web Application
Posted on 10/15/2007 7:13:07 AM
in #ASP.NET 2.X
Hi,
Many a times we want to find the Virtual path of the Web Application. Getting the virtual paths local to server is pretty straight forward Page.ResolveURL("~").
If you require the same in the BLL, then you have to use the System.Web.HttpRuntime.AppDomainAppVirtualPath
Remember if the web application is in the server root then the following command will return “/” and if the web application is not in the root folder then the command will return the path of the root folder without the “/” in the end.
Vikram
|