CatalogZoneBase.CatalogParts Property

Gets a collection of all the CatalogPart controls contained in a CatalogZoneBase zone.

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

public:
property CatalogPartCollection^ CatalogParts {
	CatalogPartCollection^ get ();
}
/** @property */
public CatalogPartCollection get_CatalogParts ()

public function get CatalogParts () : CatalogPartCollection

Not applicable.

Property Value

A CatalogPartCollection that contains all the individual CatalogPart controls in a zone.

Exception typeCondition

InvalidOperationException

A CatalogPart being added to the collection did not have a value assigned to its ID property.

The CatalogParts property provides a reference to a collection of all the CatalogPart controls in the zone. It references both the CatalogPart controls provided with the Web Parts control set, and any custom CatalogPart controls that are added to the zone.

The collection is initially created when another method accesses the CatalogParts property, and the property calls the CreateCatalogParts method.

NoteNote:

Note that any CatalogPart that is added to the collection of CatalogPart controls in an implementation of the CreateCatalogParts method must have a value assigned to its ID property, otherwise an exception will be thrown when the collection is assigned to the CatalogParts property.

The following code example demonstrates how to access the CatalogParts property programmatically. For the full code required to run the example, see the Example section of the CatalogZoneBase class overview.

The code example shows how to access the CatalogParts property, iterate through the collection, and list the IDs of all the CatalogPart controls in the zone.

No code example is currently available or this language may not be supported.

When you load the page in a browser, you can select Catalog from the drop-down list to switch to catalog display mode. When the catalog is visible, you can click the List CatalogParts button to demonstrate how the CatalogParts property can be accessed.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: