IWebPart.CatalogIconImageUrl Property

Gets or sets the URL to an image that represents a WebPart control in a catalog of controls.

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

property String^ CatalogIconImageUrl {
	String^ get ();
	void set (String^ value);
}
/** @property */
String get_CatalogIconImageUrl ()

/** @property */
void set_CatalogIconImageUrl (String value)

function get CatalogIconImageUrl () : String

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 ("").

Web Parts applications often provide a catalog (or list) of controls that users can add to a page. The CatalogIconImageUrl property on a control contains the URL to an image that represents the control when it appears in a catalog.

The following code example demonstrates declarative and programmatic use of the CatalogIconImageUrl property. The complete source code for the example is found in the Example section of the IWebPart class overview.

The first part of the code example shows how the user control implements the CatalogIconImageUrl property.

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

The second part of the code example demonstrates the method in the user control that programmatically sets the value of the CatalogIconImageUrl property when a user selects the appropriate property name from the radio buttons on the page, sets a new value in the text box, and then clicks the Update button.

Security noteSecurity Note:

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio).

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

The third part of the code example shows how the user control that implements the IWebPart interface is referenced in a WebPartZone control, and how the CatalogIconImageUrl property is set declaratively on the control. Note that because there is no catalog of Web Parts controls provided with this example, you cannot see the actual effect of setting this property.

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

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: