Export (0) Print
Expand All

HyperLink::ImageUrl Property

Gets or sets the path to an image to display for the HyperLink control.

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

[BindableAttribute(true)]
public:
virtual property String^ ImageUrl {
	String^ get ();
	void set (String^ value);
}
<asp:HyperLink ImageUrl="String" />

Property Value

Type: System::String
The path to the image to display for the HyperLink control. The default value is an empty string ("").

The HyperLink control can be displayed as text or an image. Use the ImageUrl property to specify an image to display for the HyperLink control.

NoteNote

If both the Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is displayed. In browsers that support ToolTip functionality, the Text property also becomes the ToolTip.

The following example demonstrates how to set the ImageUrl property to specify the path to the image to display.

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft