.Net檢測是否虛擬目錄 并返回 "/"
private string GetAppPath()
{
string applicationPath = HttpContext.Current.Request.ApplicationPath;
if (applicationPath.Length > 1)
{
applicationPath = applicationPath + "/";
}
return applicationPath;
}
{
string applicationPath = HttpContext.Current.Request.ApplicationPath;
if (applicationPath.Length > 1)
{
applicationPath = applicationPath + "/";
}
return applicationPath;
}