SPWebTemplate.Name Property

Gets the name of the site definition configuration or site template.

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

Syntax

Public ReadOnly Property Name As String
    Get

Dim instance As SPWebTemplate
Dim value As String

value = instance.Name
public string Name { get; }

Property Value

Type: System.String
A String that represents the name; for example, "STS#0" or "MyCustomSiteTemplate.stp".

Remarks

If the SPWebTemplate represents a site definition configuration, this property is a concatenation of the Name attribute of a <Template> element in a WebTemp*.xml file and the ID attribute of one of the child <Configuration> elements of the Template element. (See WebTemp.xml for more information.) There is a "#" character in between the two parts; for example "MPS#1" or "MyCustomSiteDefinition#0".

If the SPWebTemplate represents a site template, this property returns the name of the file, in the SharePoint database, that stores the template; for example, "PersonalPage.stp".

See Also

Reference

SPWebTemplate Class

SPWebTemplate Members

Microsoft.SharePoint Namespace

Other Resources

WebTemp.xml

Collaborative Application Markup Language (CAML)

Custom Site Templates

Site Definitions and Configurations