Site.ServerRelativeUrl property

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

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

Syntax

'Declaration
Public ReadOnly Property ServerRelativeUrl As String
    Get
'Usage
Dim instance As Site
Dim value As String

value = instance.ServerRelativeUrl
public string ServerRelativeUrl { get; }

Property value

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

Exceptions

Exception Condition
UnauthorizedAccessException

The current user has insufficient permissions to perform the operation.

Remarks

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

See also

Reference

Site class

Site members

Microsoft.SharePoint.Client namespace