Web.GetFolderByServerRelativeUrl 方法

Returns the folder object located at the specified server-relative URL.

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Function GetFolderByServerRelativeUrl ( _
    serverRelativeUrl As String _
) As Folder
用法
Dim instance As Web
Dim serverRelativeUrl As String
Dim returnValue As Folder

returnValue = instance.GetFolderByServerRelativeUrl(serverRelativeUrl)
public Folder GetFolderByServerRelativeUrl(
    string serverRelativeUrl
)

参数

  • serverRelativeUrl
    类型:System.String

    A string that specifies the server-relative URL for the folder.

返回值

类型:Microsoft.SharePoint.Client.Folder
A Folder object that represents the folder.

异常

异常 条件
FileNotFoundException

serverRelativeUrl does not correspond to a folder or a file or does not to start with a ‘/’. Error code: -2147024809.

备注

You must have Browse Directories permissions to run code that uses the GetFolderByServerRelativeUrl method.

It must not be 空引用(无 在 Visual Basic 中).

另请参阅

引用

Web 类

Web 成员

Microsoft.SharePoint.Client 命名空间