Export (0) Print
Expand All
Expand Minimize

SPWeb.WebTemplate Property

Windows SharePoint Services 3

Gets the name of the site definition that was used to create the site, or gets the name of the site definition from which the site template that was used to create the site is derived.

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

public string WebTemplate { get; }

Property Value

Type: System.String
A string that contains the name of the site definition. This value corresponds to the Name attribute of the Template element in Collaborative Application Markup Language (CAML).

When you create a custom template by saving a site as a template and then create a site from that template, the WebTemplate property contains the name of the site definition from which the custom template derives, not the name of the custom template.

Community Additions

ADD
Show:
© 2014 Microsoft