Partager via


WebTemplate Property

The WebTemplate property of the SPWeb class gets the name of the site definition that was used to create the site or the name of the site definition from which derives the site template that was used to create the site.

Property Value

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

Remarks

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

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security