Share via


WebCollection.Add method

Adds a new Web site to the collection.

Namespace:  Microsoft.SharePoint.Client
Assembly:  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Function Add ( _
    parameters As WebCreationInformation _
) As Web
'Usage
Dim instance As WebCollection
Dim parameters As WebCreationInformation
Dim returnValue As Web

returnValue = instance.Add(parameters)
public Web Add(
    WebCreationInformation parameters
)

Parameters

Return value

Type: Microsoft.SharePoint.Client.Web
A Web object that represents the new Web site.

Exceptions

Exception Condition
SPException

The URL specified in parameters is already in use. Error code: -2147024713.

See also

Reference

WebCollection class

WebCollection members

Microsoft.SharePoint.Client namespace