WebPartVerb.ImageUrl Property

Gets or sets a string containing a URL to an image that represents a verb in the user interface (UI).

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

public:
virtual property String^ ImageUrl {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_ImageUrl ()

/** @property */
public void set_ImageUrl (String value)

public function get ImageUrl () : String

public function set ImageUrl (value : String)

Not applicable.

Property Value

A string that contains the URL to an image. The default is an empty string ("").

The ImageUrl property provides a way to use a customized visual representation for verbs as an alternative to the default rendering, which is typically a button or a hyperlink. If you assign a URL to the property, the image appears in verbs menus (next to the verb) or directly in forms (in place of a button or hyperlink that represents the verb).

The following code example shows how to override the ImageUrl property in a derived class inheriting from WebPartVerb. This source code shows only the portion of the code for the custom zone and the WebPartVerb class that overrides the property. The rest of the code required to run the example can be found in the Example section of the WebPartVerb class overview. Note that the sample code assigns a fictitious icon to the ImageUrl property; if you assign a real image or icon, it will appear next to the verb in the verbs menu.

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: