现在的位置: 首页 > 综合 > 正文

.Net檢測是否虛擬目錄 并返回 “/”

2012年08月25日 ⁄ 综合 ⁄ 共 277字 ⁄ 字号 评论关闭
 private string GetAppPath()
        {
            string applicationPath = HttpContext.Current.Request.ApplicationPath;
            if (applicationPath.Length > 1)
            {
                applicationPath = applicationPath + "/";
            }
           
            return applicationPath;
        }

抱歉!评论已关闭.