The System.Web.UI.TemplateInstance enumeration specifies values indicating the number of times an instance of a template can be created. The System.Web.UI.TemplateInstanceAttribute class uses values from the System.Web.UI.TemplateInstance enumeration. In particular, the TemplateInstanceAttribute.Single and TemplateInstanceAttribute.Multiple fields specify single and multiple instances of a template, respectively. A single instance of a template allows you to reference controls that are contained within the template.
Examples of controls that use the TemplateInstance.Single value in property metadata include the System.Web.UI.WebControls.WebParts.CatalogZone.ZoneTemplate property of the System.Web.UI.WebControls.WebParts.CatalogZone control, the System.Web.UI.WebControls.WebParts.EditorZone.ZoneTemplate property of the System.Web.UI.WebControls.WebParts.EditorZone control, and the System.Web.UI.WebControls.WebParts.WebPartZone.ZoneTemplate property of the System.Web.UI.WebControls.WebParts.WebPartZone.
Member Name | Description |
---|---|
Multiple |
A template that is instantiated multiple times. |
Single |
A template that is instantiated only one time. |