GenericWebPart::CatalogIconImageUrl Property
Gets or sets the URL to an image that represents a GenericWebPart control in a catalog of controls.
Assembly: System.Web (in System.Web.dll)
public: property String^ CatalogIconImageUrl { virtual String^ get() override; virtual void set(String^ value) override; }
Property Value
Type: System::String^A string that represents the URL to an image used to represent the control in a catalog. The default value is an empty string ("").
Implements
IWebPart::CatalogIconImageUrlWeb 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. This property overrides the base property so that you can access the property on the child control as if it were a true WebPart control.
You can set values for the property on your control in the declarative markup of a Web page, as well as programmatically. To provide a default value for the property whenever the control is used, you can implement the IWebPart interface.
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 GenericWebPart overview topic.
The first part of the code example shows how the CatalogIconImageUrl property is set declaratively on a server control within a WebPartZone control.
The second part of the code example demonstrates the method that programmatically accesses the value of the property when a user clicks the Display All Property Values button.
Available since 2.0