SPWebTemplate.Name Property
Gets the internal name of the site definition configuration or Web template.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
<ClientCallableAttribute> _
Public ReadOnly Property Name As String
Get
'Usage
Dim instance As SPWebTemplate
Dim value As String
value = instance.Name
[ClientCallableAttribute]
public string Name { get; }
Property Value
Type: System.String
A String that represents the name; for example, "STS#0" or "MyCustomWebTemplate".
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 Understanding WebTemp*.xml Files for more information.) There is a "#" character in between the two parts; for example "MPS#1" or "MyCustomSiteDefinition#0".
If the SPWebTemplate represents a Web template, this property returns the Name attribute of the WebTemplate element in a elements.xml file contained in the .wsp file that stores the Web template.
See Also
Reference
Microsoft.SharePoint Namespace
Other Resources
Understanding WebTemp*.xml Files