SPLink.ServerRelativeUrl Property
Gets the server-relative URL of the link.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public ReadOnly Property ServerRelativeUrl As String
Get
'Usage
Dim instance As SPLink
Dim value As String
value = instance.ServerRelativeUrl
public string ServerRelativeUrl { get; }
Property Value
Type: System.String
A string that contains the server-relative URL or the link. Returns a null reference (Nothing in Visual Basic) if the link goes to an external server.
Remarks
Any link from the same domain and server has a server-relative URL, including external links from a different site or site collection.