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

 private string GetAppPath()
        {
            string applicationPath = HttpContext.Current.Request.ApplicationPath;
            if (applicationPath.Length > 1)
            {
                applicationPath = applicationPath + "/";
            }
           
            return applicationPath;
        }
posted @ 2010-02-10 09:40  ggbbeyou  阅读(132)  评论(0编辑  收藏  举报