Share via


SPWebEventProperties.ServerRelativeUrl Property

Gets a server-relative URL that represents the address of the Web site before it was moved, or gets the current server-relative URL if a Web site is renamed.

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 SPWebEventProperties
Dim value As String

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

Property Value

Type: System.String
A string that contains the server-relative URL of the Web site.

Remarks

For Before events, this value is the URL of the parent Web; for After events, it is the value of the subweb. In the case of the root Web, this value is a null reference (Nothing in Visual Basic).

See Also

Reference

SPWebEventProperties Class

SPWebEventProperties Members

Microsoft.SharePoint Namespace