Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HyperLink Web Server Control Overview

The HyperLink Web server control creates links on a Web page that enables users to move from page to page in an application.

This topic contains:

The primary advantage of using a HyperLink control is that you can set link properties in server code. For example, you can dynamically change the link text or target page based on conditions in the page.

Security noteSecurity Note

The URLs associated with a hyperlink can be tampered with by a malicious user. For more information, see How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings.

Another advantage of using the HyperLink control is that you can use data binding to specify the target URL for the link (and parameters to be passed with the link, if necessary). A typical example is to create HyperLink controls based on a list of products. The target URL points to a page where the user can read more detail about the product.

TipTip

If you need to create data-bound HyperLink controls, a convenient way to do so is to add them as children of these controls: Repeater, DataList, GridView, FormView, or DetailsView.

The HyperLink control can display clickable text or an image.

Unlike most Web server controls, the HyperLink control does not raise an event in server code when users click it. Instead, the control simply performs navigation.

Back to top

The following table lists the classes that relate to the HyperLink control.

Member

Description

HyperLink

The main class for the control.

Back to top

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft