Export (0) Print
Expand All

WebPart::TitleIconImageUrl Property

Gets or sets the URL to an image used to represent a Web Parts control in the control's title bar.

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

[PersonalizableAttribute(PersonalizationScope::Shared)]
public:
virtual property String^ TitleIconImageUrl {
	String^ get ();
	void set (String^ value);
}
<asp:WebPart TitleIconImageUrl="String" />

Property Value

Type: System::String
A string that represents the URL to an image used to represent the control in its title bar. The default value is an empty string ("").

Implements

IWebPart::TitleIconImageUrl

ExceptionCondition
ArgumentException

The internal validation system has determined that the URL might contain script attacks.

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 TitleIconImageUrl property for a custom Web Parts control, so that the control appears with an image 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.

In the declarative markup of the Web page, note the <aspSample:TextDisplayWebPart> element. Its TitleIconImageUrl attribute is assigned a string that contains the URL to an image file. Load the page in a browser, and if you provided a legitimate URL to an image, the image appears in the title bar of the WebPart control.

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

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft