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 空引用(无 在 Visual Basic 中).

另请参阅

引用

Site 类

Site 成员

Microsoft.SharePoint.Client 命名空间