Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ServerRelativeUrl property
Collapse the table of content
Expand the table of content

SPSite.ServerRelativeUrl property

Gets the server-relative URL of the root Web site in the site collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public string ServerRelativeUrl { get; }

Property value

Type: System.String
A string that contains the URL.

The ServerRelativeUrl property contains a forward slash ("/").

© 2015 Microsoft