Redigeeri

Jagamisviis:


CatalogZone.ZoneTemplate Property

Definition

Gets or sets a template to contain child controls within a CatalogZone control in page persistence format.

public:
 virtual property System::Web::UI::ITemplate ^ ZoneTemplate { System::Web::UI::ITemplate ^ get(); void set(System::Web::UI::ITemplate ^ value); };
[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.WebParts.CatalogZone))]
[System.Web.UI.TemplateInstance(System.Web.UI.TemplateInstance.Single)]
public virtual System.Web.UI.ITemplate ZoneTemplate { get; set; }
[<System.ComponentModel.Browsable(false)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
[<System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.WebParts.CatalogZone))>]
[<System.Web.UI.TemplateInstance(System.Web.UI.TemplateInstance.Single)>]
member this.ZoneTemplate : System.Web.UI.ITemplate with get, set
Public Overridable Property ZoneTemplate As ITemplate

Property Value

An ITemplate that acts as a container for child controls in the zone.

Attributes

Remarks

The ZoneTemplate property references a template of type ITemplate that is used to contain the CatalogPart controls in the zone. The zone template enables page developers to declare the CatalogPart controls they want to use in persistence format, rather than having to create all the controls programmatically.

The set accessor for the ZoneTemplate property calls the InvalidateCatalogParts method, which forces the collection of CatalogPart controls that are declared in the zone template on the page to be refreshed. This ensures that the collection of controls referenced by the zone remains current whenever a user changes the controls actually declared within the template on the page.

Notes to Inheritors

If you want to create a custom CatalogZone zone, but you plan to create the CatalogPart controls programmatically rather than allowing page developers to declare them, you do not need zone template support, and you can inherit directly from the CatalogZoneBase class.

Applies to

See also