HyperLink Control
A HyperLink control behaves very similarly to an HTML <a> element control, except that you can program it using server code. Indeed, the control is rendered on the client browser as an HTML anchor element (i.e., <a>) with the control’s properties reflected in the element’s attributes.
The HyperLink control has four control-specific properties:
ImageUrlSets the path to an image to be displayed by the control rather than text set in the
Textproperty.NavigateUrlThe target URL to navigate to once the user clicks on the hyperlink.
TextThe text string that will be displayed on the browser as the link. If the
TextandImageUrlproperties are both set, theImageUrltakes precedence. The text will be displayed if the image is unavailable.If the browser supports tool tips and the
ToolTipproperty (inherited from theWebControlclass) has not been set, theTextvalue will display as a tool tip. If theToolTipproperty has been set, theToolTiptext string will display as a tool tip.TargetDefines the window or frame that will load the linked page. The value is case-insensitive and must begin with a character in the range of a—z, except for the special values shown in Table 4-6, all of which begin with an underscore. Note that these are the standard HTML values for the target attribute of an
<a>element.Table 4-6. Special values of the Target attribute
Target value
Description
_blankRenders the content in a new unnamed window without frames.
_newNot documented, but behaves the same ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access