asp.net.ph

Skip Navigation Links

Introduction to the HyperLink Control

Controls You Can Use on Web Forms   ASP.NET Standard Controls   HyperLink Control


The HyperLink Web server control creates links on a Web page that allow users to move from page to page in your application. 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 your page.

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.

TIP: If you need to create data-bound HyperLink controls, a convenient way to do so is to add them as children of a Repeater, DataList, or DataGrid control.

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.

See Also

Adding HyperLink Controls to a Web Forms Page   Adding Controls to a Web Forms Page Programmatically   Web Forms Data Binding



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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