网站根路径

 public static string UrlScheme
    {
        get
        {
            return System.Web.HttpContext.Current.Request.Url.Scheme + "://";
        }
    }
    public static string AppUrl
    {
        get
        {
            string Url = UrlScheme + System.Web.HttpContext.Current.Request.Url.Authority + System.Web.HttpContext.Current.Request.ApplicationPath;
            Url = Url.TrimEnd('/');
            return Url;
        }
    }
posted @ 2009-11-09 11:13  94cool  阅读(135)  评论(0)    收藏  举报