CODE:
public static string ApplicationPath
{
get
{
string APP_PATH = System.Web.HttpContext.Current.Request.ApplicationPath.ToLower();
if(APP_PATH == "/") //a site
APP_PATH = "/";
else if(!APP_PATH.EndsWith(@"/")) //a virtual
APP_PATH += @"/";
return APP_PATH;
}
}
0 comments:
Post a Comment