Finding the Virtual path of the web Application

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


Share this post   Email it |  digg it! |  reddit! |  bookmark it!

Feedback

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 
Copyright © 2006 - 2009 Vikram Lakhotia