asp.net - How to show tool tip on a HyperLink

Display a tooltip on a HyperLink
The HyperLink is a control that displays a link to another Web page. The asp.net developers use the HyperLink control to create a link to another Web page. The HyperLink web server control is typically displayed as text specified by the Text property. But the asp.net c# developers can also display an image on it specified by the ImageUrl property.

The following asp.net c# tutorial code demonstrates how we can show a tooltip on a Hyperlink control. In the below example code, we displayed a tooltip on the HyperLink control using its ToolTip property.

The HyperLink ToolTip property gets or sets the text displayed when the mouse pointer hovers over the HyperLink web server control. The ToolTip property value is a String that represents the text displayed when the mouse pointer hovers over the Web server control. The default value of the ToolTip property is Empty. The HyperLink control’s ToolTip property is inherited from WebControl.

So finally, using the HyperLink control’s ToolTip property the asp.net c# developers can show a tooltip on the HyperLink when someone's mouse pointer hovers over the HyperLink control.
HyperLinkToolTip.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>How to show tool tip (Tooltip) in HyperLink</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Navy">HyperLink Example: ToolTip</h2>
        <asp:HyperLink 
             ID="HyperLink1"
             runat="server"
             Text="CheckBoxList SkinID Example"
             NavigateUrl="~/CheckBoxList/CheckBoxListSkinID.aspx"
             ForeColor="Crimson"
             BorderWidth="2"
             BorderColor="LavenderBlush"
             Font-Size="Large"
             Font-Italic="true"
             ToolTip="CheckBoxList SkinID Page"
             Font-Bold="true"
             >
        </asp:HyperLink>
        <br /><br />
        <asp:HyperLink 
             ID="HyperLink2"
             runat="server"
             Text="CheckBox SkinID Example"
             NavigateUrl="~/CheckBox/CheckBoxskinID.aspx"
             ForeColor="Crimson"
             BorderWidth="2"
             BorderColor="LavenderBlush"
             Font-Bold="true"
             Font-Size="Large"
             Font-Italic="true"
             ToolTip="CheckBox SkinID Page"
             >
        </asp:HyperLink>
    </div>
    </form>
</body>
</html>








More asp.net example