CatalogZone.ZoneTemplate Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[TemplateContainerAttribute(typeof(CatalogZone))]
[TemplateInstanceAttribute(TemplateInstance.Single)]
public virtual ITemplate ZoneTemplate { get; set; }

Property Value

Type: System.Web.UI.ITemplate

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

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.

.NET Framework
Available since 2.0
Return to top
Show: