SPSiteAdministration.AddWeb method

Adds a new site with the specified properties to the site collection.

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

Syntax

'Declaration
Public Sub AddWeb ( _
    strWebUrl As String, _
    strTitle As String, _
    strDescription As String, _
    nLCID As UInteger, _
    strWebTemplate As String, _
    useUniquePermissions As Boolean, _
    bConvertIfThere As Boolean _
)
'Usage
Dim instance As SPSiteAdministration
Dim strWebUrl As String
Dim strTitle As String
Dim strDescription As String
Dim nLCID As UInteger
Dim strWebTemplate As String
Dim useUniquePermissions As Boolean
Dim bConvertIfThere As Boolean

instance.AddWeb(strWebUrl, strTitle, strDescription, _
    nLCID, strWebTemplate, useUniquePermissions, _
    bConvertIfThere)
public void AddWeb(
    string strWebUrl,
    string strTitle,
    string strDescription,
    uint nLCID,
    string strWebTemplate,
    bool useUniquePermissions,
    bool bConvertIfThere
)

Parameters

  • strWebUrl
    Type: System.String

    A string containing the URL of the site.

  • strTitle
    Type: System.String

    A string containing the title of the site.

  • strDescription
    Type: System.String

    A string containing the description for the site.

  • nLCID
    Type: System.UInt32

    A 32-bit integer containing the locale identifier for the site.

  • strWebTemplate
    Type: System.String

    A string containing the name of the Web template to apply to the new site.

  • useUniquePermissions
    Type: System.Boolean

    true to use unique permission for the site; false to inherit permissions.

  • bConvertIfThere
    Type: System.Boolean

    true to convert an existing folder of the same name to a SharePoint site; false to throw an exception indicating that a URL path with the specified site name already exists.

See also

Reference

SPSiteAdministration class

SPSiteAdministration members

Microsoft.SharePoint.Administration namespace