System.Web.UI.WebControls.HyperLink.ImageUrl Property

Gets or sets the path to an image to display for the System.Web.UI.WebControls.HyperLink control.

Syntax

[System.Web.UI.UrlProperty]
[System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.DefaultValue("")]
[System.ComponentModel.Bindable(true)]
public virtual string ImageUrl { set; get; }

Value

Relative or full path location of the image currently displayed in the System.Web.UI.WebControls.HyperLink.

Remarks

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

Note:

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

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0