This documentation is archived and is not being maintained.

CatalogZoneBase::SelectedCatalogPartID Property

Gets or sets a string as an identifier for the currently selected CatalogPart control in a zone.

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

[ThemeableAttribute(false)]
public:
property String^ SelectedCatalogPartID {
	String^ get ();
	void set (String^ value);
}
<asp:CatalogZoneBase SelectedCatalogPartID="String" />

Property Value

Type: System::String
A string that serves as the identifier for the currently selected control. The default is the value of the control's ID property.

The SelectedCatalogPartID property allows you to set an identifier of your choice for the currently selected CatalogPart control. This does not change the control's ID property value, so you can use this property for your own programmatic purposes. For example, if you wanted to always carry out some programmatic action on the currently selected CatalogPart control, this property enables you to access that control through a known value that you set in advance.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

The following code example demonstrates how to use the SelectedCatalogPartID property declaratively and programmatically. For the full code required to run the example, see the Example section of the CatalogZoneBase class overview.

Notice that the first part of the code example declares two <asp:catalogzone> elements, and the first one declares a value for the SelectedCatalogPartID property.

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

In the second part of the code example, the text value for the SelectedCatalogPartID property of the currently selected control is displayed.

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, click one of the links to a CatalogPart control to select it. Then click the Show Selected CatalogPart ID button to display the property value. Notice that the value of the property is the value that was set declaratively for the zone. If you select the other CatalogPart controls in the zone, the same value becomes the value of the SelectedCatalogPartID property for each control when it is selected. If you do not set the value of the SelectedCatalogPartID property, the default value is always the value of the ID property for the currently selected control.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: