SPLink.ServerRelativeUrl property

Gets the server-relative URL of the link.

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

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.

See also

Reference

SPLink class

SPLink members

Microsoft.SharePoint namespace