URL object models in normal and SharePoint

Getting page URLs in SharePoint sites is a bit different from normal ASP.NET sites, this article shows some examples about how to use them. In normal site: e.g. If we got a URL like http://localhost:81/cuisine/french/default.aspx, then we can use the below code to get URL objects. HttpContext.Current.Request.Url.AbsolutePath output: /cuisine/french/default.aspx HttpContext.Current.Request.Url.AbsoluteUri output: Read more…

By William Yin, ago