Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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)
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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.