Site.OpenWeb - Méthode
Opens a new site using the specified URL.
Espace de noms : Microsoft.SharePoint.Client
Assemblys : Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)
Syntaxe
'Déclaration
Public Function OpenWeb ( _
strUrl As String _
) As Web
'Utilisation
Dim instance As Site
Dim strUrl As String
Dim returnValue As Web
returnValue = instance.OpenWeb(strUrl)
public Web OpenWeb(
string strUrl
)
Paramètres
strUrl
Type : System.StringSpecifies the server-relative URL or web-relative URL of the site to open. If strurl is empty, the top-level site must be opened.
Valeur renvoyée
Type : Microsoft.SharePoint.Client.Web
Returns a Web instance representing the opening of a new site using the specified URL.
Exceptions
Exception | Condition |
---|---|
[System.ArgumentException] | The specified URL must refer to a valid site. Error code: -2147024809. |
Remarques
It must not be une référence Null (Rien dans Visual Basic).