Tuesday, 22 October 2013

How to Get the WEBSite Base URL

   private string websiteBase;
        protected string WebSiteBase
        {
            get
            {
                if (string.IsNullOrEmpty(websiteBase))
                websiteBase = Uri.UriSchemeHttp + System.Uri.SchemeDelimiter + Request.Url.Host;

                return websiteBase;
            }
        }

No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...