SPSite.GetWebTemplates method (UInt32, Int32)

Returns the collection of site definitions that are available for creating Web sites within the site collection.

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


Public Function GetWebTemplates ( _
    LCID As UInteger, _
    overrideCompatLevel As Integer _
) As SPWebTemplateCollection
Dim instance As SPSite
Dim LCID As UInteger
Dim overrideCompatLevel As Integer
Dim returnValue As SPWebTemplateCollection

returnValue = instance.GetWebTemplates(LCID, _
public SPWebTemplateCollection GetWebTemplates(
    uint LCID,
    int overrideCompatLevel


Return value

Type: Microsoft.SharePoint.SPWebTemplateCollection
An SPWebTemplateCollection object that represents the site definitions.


The method provided here mainly for the case when creating new spsite in compatibility mode, e.g. 14 in a 15 farm, where Admin Site's compatibility level is by default used

See also


SPSite class

SPSite members

GetWebTemplates overload

Microsoft.SharePoint namespace