System.Web.UI.WebControls (system.web.dll) | class |
This class represents a link to another web page, which is specified
by the NavigateUrl property. The control can be
displayed as text specified by the Text property
or as the image located at ImageUrl. If both
properties are set, ImageUrl takes precedence,
provided the image file is available, and the Text
is used for an image tooltip. The Target property
specifies the name of the frame that the linked page will be loaded
into. Note that you cannot respond to the link click in code. If you
want to provide this type of behavior, use the
LinkButton control instead.
The HyperLink control also supports databinding to
its Text and NavigateUrl
properties.
public class HyperLink : WebControl {
// Public Constructors
public HyperLink( );
// Public Instance Properties
public virtual string ImageUrl{set; get; }
public string NavigateUrl{set; get; }
public string Target{set; get; }
public virtual string Text{set; get; }
// Protected Instance Methods
protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer); // overrides WebControl
protected override void AddParsedSubObject(object obj); // overrides System.Web.UI.Control
protected override void LoadViewState(object savedState); // overrides WebControl
protected override void RenderContents(System.Web.UI.HtmlTextWriter writer); // overrides WebControl
}
Hierarchy
System.Object
System.Web.UI.Control(System.ComponentModel.IComponent,
System.IDisposable,
System.Web.UI.IParserAccessor,
System.Web.UI.IDataBindingsAccessor)
WebControl(System.Web.UI.IAttributeAccessor)
HyperLink