Поделиться через


Метод Site.OpenWeb

Opens a new site using the specified 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 OpenWeb ( _
    strUrl As String _
) As Web
'Применение
Dim instance As Site
Dim strUrl As String
Dim returnValue As Web

returnValue = instance.OpenWeb(strUrl)
public Web OpenWeb(
    string strUrl
)

Параметры

  • strUrl
    Тип: System.String

    Specifies the server-relative URL or web-relative URL of the site to open. If strurl is empty, the top-level site must be opened.

Возвращаемое значение

Тип: Microsoft.SharePoint.Client.Web
Returns a Web instance representing the opening of a new site using the specified URL.

Исключения

Исключение Условие
[System.ArgumentException]

The specified URL must refer to a valid site. Error code: -2147024809.

Замечания

It must not be пустая ссылка (Nothing в Visual Basic).

См. также

Справочные материалы

Site класс

Элементы Site

Пространство имен Microsoft.SharePoint.Client