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

Display tool tip on RadioButton
RadioButton is an asp.net web server control. we can display tooltip on radiobutton control by using its built in property.

radiobutton ToolTip property get or set the text displayed when the mouse pointer hovers over the radiobutton control. this property value type is System.String. the 'String' represents the text displayed when mouse pointer hover over the radiobutton server control. the default value of this property is String.Empty that indicate no tool tip is set for radiobutton control. radiobutton ToolTip property allow us to display extra information or instruction about the control itself.

the following asp.net c# example code demonstrate us how can we display tool tip on radiobutton control in an asp.net application.
RadioButtonToolTip.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 use ToolTip (tool tip) in RadioButton</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Green">RadioButton Example: ToolTip</h2>
        <asp:Label 
             ID="Label1"
             runat="server"
             Font-Bold="true"
             ForeColor="Blue"
             Text="Favorite Color?"
             >
        </asp:Label>
        <br />
        <asp:RadioButton 
             ID="RadioButton1" 
             runat="server"
             Text="LightYellow"
             GroupName="Colors"
             ToolTip="Click for select LightYellow"
             Font-Size="Large"
             ForeColor="SaddleBrown"
             />
        <asp:RadioButton 
             ID="RadioButton2" 
             runat="server"
             Text="MediumBlue"
             GroupName="Colors"
             ToolTip="Click for select MediumBlue"
             Font-Size="Large"
             ForeColor="SaddleBrown"
             />
    </div>
    </form>
</body>
</html>








Related asp.net examples