Template Property

TemplateBasedControl.Template Property

Gets or sets the template that renders the control.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

'Declaration
<TemplateContainerAttribute(GetType(TemplateBasedControl))> _
Public Property Template As ITemplate
	Get
	Set
'Usage
Dim instance As TemplateBasedControl
Dim value As ITemplate

value = instance.Template

instance.Template = value

Property Value

Type: System.Web.UI.ITemplate
An ITemplate object that renders the control.

If the Template property is not set, the property returns the template that is named by the TemplateName property. (If the latter is not specifically set, it returns the value specified in the DefaultTemplateName property.)

Notes to Callers

The default set accessor for the Template property does not set the TemplateName property. For this reason, the two property values could be logically inconsistent. Consider leaving the Template property value unset and instead, set TemplateName. In this way, you are indirectly setting the value of the Template.

Show:
© 2016 Microsoft