This documentation is archived and is not being maintained.

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)

'Declaration
Public ReadOnly Property WebTemplate As String
	Get
'Usage
Dim instance As SPWeb
Dim value As String

value = instance.WebTemplate

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.

Show: