Web.GetAvailableWebTemplates Method

Returns a collection of site templates available for the site.

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 GetAvailableWebTemplates ( _
    lcid As UInteger, _
    doIncludeCrossLanguage As Boolean _
) As WebTemplateCollection
'Usage
Dim instance As Web
Dim lcid As UInteger
Dim doIncludeCrossLanguage As Boolean
Dim returnValue As WebTemplateCollection

returnValue = instance.GetAvailableWebTemplates(lcid, _
    doIncludeCrossLanguage)
[RemoteAttribute]
public WebTemplateCollection GetAvailableWebTemplates(
    uint lcid,
    bool doIncludeCrossLanguage
)

Parameters

  • lcid
    Type: System.UInt32

    Specifies the LCID of the site templates to be retrieved.

    If the specified LCID is not a valid LCID, the server must return an empty collection.

    An LCID is a 4-byte value. The value supplied in an LCID is a standard numeric substitution for the international [RFC4646] string.

  • doIncludeCrossLanguage
    Type: System.Boolean

    Specifies whether to include language-neutral site templates.

Return Value

Type: Microsoft.SharePoint.Client.WebTemplateCollection
Returns a WebTemplateCollection instance representing collection of site templates available for the site.

Exceptions

Exception Condition
[System.UnauthorizedAccessException]

The current user has insufficient permissions. Error code: -2147024891.

See Also

Reference

Web Class

Web Members

Microsoft.SharePoint.Client Namespace