Метод Web.GetFileByServerRelativeUrl
Returns the file 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 GetFileByServerRelativeUrl ( _
serverRelativeUrl As String _
) As File
'Применение
Dim instance As Web
Dim serverRelativeUrl As String
Dim returnValue As File
returnValue = instance.GetFileByServerRelativeUrl(serverRelativeUrl)
public File GetFileByServerRelativeUrl(
string serverRelativeUrl
)
Параметры
serverRelativeUrl
Тип: System.StringA string that specifies the server-relative URL for the file.
Возвращаемое значение
Тип: Microsoft.SharePoint.Client.File
A File object that represents the file.
Исключения
Исключение | Условие |
---|---|
ArgumentException | The serverRelativeUrl does not start with a '/' or serverRelativeUrl does not correspond to a file. |
Замечания
It must not be пустая ссылка (Nothing в Visual Basic). It must not be empty.