首页 > 代码库 > WebService 获取当前URL

WebService 获取当前URL

 

        private string pageRoot = string.Empty;
        public virtual string PortalRoot
        {
            get
            {
                if (pageRoot == null || pageRoot == "")
                {
                    pageRoot = HttpContext.Current.Request.Url + string.Empty;
                    pageRoot = pageRoot.ToLower();
                    pageRoot = pageRoot.Substring(0, pageRoot.IndexOf("/portal"));
                }
                return pageRoot;
            }
        }

 

WebService 获取当前URL