Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds a new Web site to the collection.
Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
<RemoteAttribute> _
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)
[RemoteAttribute]
public Web Add(
    WebCreationInformation parameters
)
Parameters
- parameters 
 Type: Microsoft.SharePoint.Client.WebCreationInformation- A [Microsoft.SharePoint.Client.WebCreationInformation] object that contains information associated with the Web site. - It must not be a null reference (Nothing in Visual Basic). 
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. |