Compartilhar via


Web.ServerRelativeUrl Property

Gets or sets the server-relative URL for the Web site.

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 Property ServerRelativeUrl As String
    Get
    Set
'Usage
Dim instance As Web
Dim value As String

value = instance.ServerRelativeUrl

instance.ServerRelativeUrl = value
[RemoteAttribute]
public string ServerRelativeUrl { get; set; }

Property Value

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

Exceptions

Exception Condition
ArgumentException

The site is a top-level site. Error code: - 2147024809.

Remarks

It must not be a null reference (Nothing in Visual Basic). It must not contain any of the reserved Urls. It must not contain the following illegal characters: [!#$&'+:<>?\\{|}~]|(//)|(\.\.)|(/_)|(/wpresources$)|(/wpresources/).

See Also

Reference

Web Class

Web Members

Microsoft.SharePoint.Client Namespace