Matthew Knott

Previous: Rounding up in C#
Next: Beating Error 407 In SharePoint

SharePoint URL Functions

Posted on Thursday, 04 June 2009 16:00

Various ways to get information about the current URL with SPContext.

SPContext.Current.Web.Url: http://sharepointserver/en-GB

SPContext.Current.Site.Url: http://sharepointserver

SPContext.Current.File.Name: Filename.aspx

SPContext.Current.File.ServerRelativeUrl: /en-GB/Pages/Filename.aspx

 

 

Comments

No comments have been added.

Add a comment