Name
HyperLink
Synopsis
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 : Inherits WebControl ' Public Constructors Public Sub New() ' Public Instance Properties Overridable Public Property ImageUrl As String Public Property NavigateUrl As String Public Property Target As String Overridable Public Property Text As String ' Protected Instance Methods Overrides Protected Sub AddAttributesToRender( ByVal writer As System.Web.UI.HtmlTextWriter) Overrides Protected Sub AddParsedSubObject( ByVal obj As Object) Overrides Protected Sub LoadViewState( ByVal savedState As Object) Overrides Protected Sub RenderContents( ByVal writer As System.Web.UI.HtmlTextWriter) End Class
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) ...
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.