WebService 获取当前URL

Posted Twang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

如何获取当前显示的片段?

JS获取URL的参数

java调用c#的webservice,如何传递DateTime

如何在 Spring webapp 中的 JSP 中获取正确的当前 URL

没有使用 navController.currentDestination?.id 获取当前片段 ID

如何从URL获取片段标识符(hash#之后的值)?