asp.net.ph

HtmlAnchor Class

System.Web.UI.HtmlControls Namespace


Allows programmatic access to the HTML <a> element on the server.

HtmlAnchor Class Members

Collapse   Constructors

Visibility Constructor Parameters
public HtmlAnchor ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public CausesValidation Boolean [ Get , Set ]
public HRef String [ Get , Set ]
public Name String [ Get , Set ]
public Target String [ Get , Set ]
public Title String [ Get , Set ]
public ValidationGroup String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected OnServerClick ( EventArgs e ) Void
protected RaisePostBackEvent ( String eventArgument ) Void
protected RenderAttributes ( HtmlTextWriter writer ) Void

Collapse   Events

Multicast Name Type
multicast ServerClick EventHandler

Remarks

There are two ways to use the HtmlAnchor class. The first is for navigation, and the second is for responding to postback events.

For navigation, the <a> element requires either the:

  • HRef property when used as a hypertext link, to define the destination URI of the page to link to.
  • Name property when used as an anchor, to identify a named location within a document.

Both text and images can be included within the <a> element used as a hyperlink.

When used for postback events, a method must be defined for the ServerClick event to programmatically handle the user's click on a link.

For examples illustrating use of this control, see the individual member types of this class. For syntax information, see HtmlAnchor in ASP.NET Syntax for HTML Controls.

See Also

Hyperlink   HtmlContainerControl Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph