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

Show tool tip in LinkButton
LinkButton is an asp.net web server control. linkbutton control render a hyperlink-style button on web browser. linkbutton has same functionality as a regular button control.

linkbutton server control's ToolTip property allow us to display a tooltip on linkbutton control when users mouse pointer hovers over the linkbutton control. the ToolTip property value type is System.String. we can use linkbutton ToolTip property to display a custom text (instruction or additional text) when mouse pointer hovers over the linkbutton control. this tooltip is rendered for all browsers.

the following asp.net c# example code demonstrate us how can we generate a tooltip for linkbutton control.
LinkButtonToolTip.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 LinkButton</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Navy">LinkButton Example: ToolTip</h2>
        <asp:LinkButton 
             ID="LinkButton1" 
             runat="server"
             Text="Login Button"
             ForeColor="SaddleBrown"
             Font-Bold="true"
             Font-Size="Large"
             BorderWidth="2"
             BackColor="FloralWhite"
             Font-Italic="true"
             ToolTip="Click for Login"
             >
        </asp:LinkButton>
        <asp:LinkButton 
             ID="LinkButton2" 
             runat="server"
             Text="Logout Button"
             ForeColor="SaddleBrown"
             Font-Bold="true"
             Font-Size="Large"
             BorderWidth="2"
             BackColor="FloralWhite"
             Font-Italic="true"
             ToolTip="Click for Logout"
             >
        </asp:LinkButton>
    </div>
    </form>
</body>
</html>








Related asp.net example