
HtmlAnchor | 717
HtmlControls
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
HtmlAnchor
System.Web.UI.HtmlControls (system.web.dll)
disposable
class
This class represents the <A> anchor tag in HTML, which provides a hyperlink. The
linked text is contained inside the tag and can be accessed through the InnerHtml prop-
erty. You can also programmatically change the linked page (HRef), the target frame
(Target), and the window title for the target (Title). Even if the HRef property is not set,
you can handle the ServerClick event and use a Response.Redirect statement to load a different
page. The HtmlAnchor control also supports data binding to the HRef and InnerHtml
properties.
You can use an anchor tag to mark a bookmark in a page, in which case you set the
Name property but not the HRef property. In this case, you don’t need to include any text
Figure 39-1
. The System.Web.UI.HtmlControls namespace
implementsextends
KEY
System.Web.UI
System.Web.UI.HtmlControls
Abstract ClassClass Interface
Sealed
Control
HtmlAnchor
IPostBackEventHandler
HtmlControl HtmlContainerControl
HtmlButton
HtmlForm
HtmlGenericControl
HtmlSelect
HtmlTable
HtmlTableCell
HtmlTableRow
HtmlTextArea
HtmlInputButton
HtmlInputCheckBox
HtmlInputFile
HtmlInputHidden
HtmlInputImage
HtmlInputRadioButton
HtmlInputText
*
HtmlTableRowCollection
*
*
HtmlTableCellCollection
IPostBackEventHandler ...