ASP.NET Hyperlink Control
Links to a different page are created by adding a Hyperlink Control to your page.
Just as with an HTML link, you can define the look of a link (color, background,
underlined) and the look of the link when a user places their mouse over the link
(hoover) and a different style for links once visited. You can define this in a
CSS class and then in the hyperlink control reference the class. But obviously
the most important property of the Hyperlink Control is the NavigateURL property.
Hyperlink - with no image
Below are examples of two hyperlink controls. Remember the two most important properties of the hyperlink control is the NaviagateURL and the
CssClass (if you want to change the color of the link on mouse rollover.
HyperLink
Hyperlink - with image
If you set an ImageURL property you can change the look from an underlined word
to any image you set. Below is a hyperlink with the ImageURL set to an image. Even
though this may look like an image button it is not. You use an image button
when you want to perform an action. You use a hyperlink with an image when you
want to navigate to a different URL.
This picture is the hyperlink!
ASP.NET
<asp:HyperLink ID="HyperLink3" runat="server"
ImageUrl="~/ASPNET/CONTROLS/201.jpg"
NavigateUrl="~/ASPNET/CONTROLS/THE_ImageButton.aspx">
Compare to the Image Button Control
</asp:HyperLink>
ASP.NET
Web Controls
Standard Controls
List Controls
Images & Links
Navigation