CatalogZoneBase.SelectedPartLinkStyle Property
Assembly: System.Web (in system.web.dll)
/** @property */ public Style get_SelectedPartLinkStyle ()
public function get SelectedPartLinkStyle () : Style
Not applicable.
Property Value
A Style that contains style attributes for the control that is currently selected.In a CatalogZoneBase zone, links are displayed for each type of CatalogPart control: PageCatalogPart, DeclarativeCatalogPart, and ImportCatalogPart. When a user clicks one of the links, the corresponding CatalogPart control becomes the selected control, and the child controls contained by that selected control become visible.
The Style object referenced by the SelectedPartLinkStyle property contains the style attributes of the link for the CatalogPart control that is currently selected. Although the object referenced by the property is read-only, you can still use it to set the underlying style characteristics for the selected CatalogPart control.
The following code example demonstrates how to use the SelectedPartLinkStyle 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 SelectedPartLinkStyle property.
In the second part of the code example, the text color for the selected CatalogPart control is set to a different value.
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 the link for one of the listed CatalogPart controls, and notice the style attributes of the selected control. You can click the Change Part Link Styles button to change the text color of the selected control. You can also click the links for the unselected controls, to see how the style attributes change when a control is selected.
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.