Метод 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.StringA 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 пустая ссылка (Nothing в Visual Basic).