Compartir a través de


File.ServerRelativeUrl Property

Gets the relative URL of the file based on the URL for the server.

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

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

Property Value

Type: System.String
A string that contains the URL.

Exceptions

Exception Condition
[System.UnauthorizedAccessException]

The current user has insufficient permissions. Error code: -2147024891.

Remarks

The ServerRelativeUrl property returns a string in the following form, which excludes the name of the server or root folder: /Site_Name/Subsite_Name/Folder_Name/File_Name.

It must not be a null reference (Nothing in Visual Basic). It must be a URL of server relative form.

See Also

Reference

File Class

File Members

Microsoft.SharePoint.Client Namespace