Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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:
© 2015 Microsoft