Export (0) Print
Expand All
Expand Minimize

SPWeb.WebTemplateId Property

Gets the identifier (ID) of the site definition that was used to create the site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public int WebTemplateId { get; }

Property Value

Type: System.Int32
A 32-bit integer that specifies the ID. This value corresponds to the ID attribute of the Template element in Collaborative Application Markup Language (CAML).

The range of possible values for the WebTemplateId property is described in the documentation for the SPWebTemplate.WebTemplate enumeration.

When you create a custom site template by saving a site as a template and then create a new site from the custom template, the WebTemplateId property contains the ID of the site definition from which the custom template is derived.

Community Additions

ADD
Show:
© 2014 Microsoft