SPSite.ServerRelativeUrl Property (Microsoft.SharePoint)
Gets the server-relative URL of the root Web site in the site collection.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
Public ReadOnly Property ServerRelativeUrl As String
Visual Basic (Usage)
Dim instance As SPSite
Dim value As String

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

Property Value

A string that contains the URL.
Remarks

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

See Also

Tags :


Page view tracker