WebPart.CatalogIconImageUrl Property
Assembly: System.Web (in system.web.dll)
public: virtual property String^ CatalogIconImageUrl { String^ get (); void set (String^ value); }
/** @property */ public String get_CatalogIconImageUrl () /** @property */ public void set_CatalogIconImageUrl (String value)
public function get CatalogIconImageUrl () : String public function set CatalogIconImageUrl (value : String)
Not applicable.
Property Value
A string that represents the URL to an image used to represent the control in a catalog. The default value is an empty string ("").The personalization scope of this property is set to Shared and can be modified only by authorized users. For more information, see PersonalizableAttribute and Web Parts Personalization Overview.
The following code example demonstrates how to set the CatalogIconImageUrl property for a WebPart control, so that an image appears with the control in a catalog of controls. This example assumes the use of a custom control, TextDisplayWebPart, created in the Example section of the WebPart class overview.
The code example also uses a custom user control that enables users to change display modes on a Web Parts page. The user control is referenced by means of a Register directive near the top of the Web page that hosts the user control. For a detailed description of how to create this user control and work with display modes, see Walkthrough: Developing and Using a Custom Server Control.
In the declarative markup of the Web page, note the <asp:CatalogZone> element. Nested within it are several elements, including an <aspSample:TextDisplayWebPart> element. This set of elements enables the custom WebPart control to appear in a catalog. In the markup for the <aspSample:TextDisplayWebPart> element, notice that the CatalogIconImageUrl attribute is assigned a string that contains the URL to an image file. Load the page in a browser and use the Display Mode drop-down list control to change the display mode to catalog mode. Then use the catalog user interface (UI) to add the custom WebPart control to the page.
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.