Partilhar via


SPWebTemplate.ID Property

Gets the ID for 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(Name := "Id")> _
Public ReadOnly Property ID As Integer
    Get
'Usage
Dim instance As SPWebTemplate
Dim value As Integer

value = instance.ID
[ClientCallableAttribute(Name = "Id")]
public int ID { get; }

Property Value

Type: System.Int32
A Int32 that specifies the ID.

Remarks

If the SPWebTemplate represents a site definition configuration, this property corresponds to the ID attribute of a Template element in a WebTemp*.xml file. (See Understanding WebTemp*.xml Files for more information.)

If the SPWebTemplate represents a Web template, this property corresponds to the BaseTemplateID attribute in the WebTemplate element in a elements.xml file contained in the .wsp file that stores the Web template. The value is the ID of the original site definition configuration which was the foundation of the site which served as the source of the Web template.

See Also

Reference

SPWebTemplate Class

SPWebTemplate Members

Microsoft.SharePoint Namespace

Other Resources

Understanding WebTemp*.xml Files

Collaborative Application Markup Language (CAML)

Web Templates

Site Definitions and Configurations