Share via


Site.ServerRelativeUrl Property

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

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public ReadOnly Property ServerRelativeUrl As String
    Get
'Usage
Dim instance As Site
Dim value As String

value = instance.ServerRelativeUrl
[RemoteAttribute]
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