Task-Based Help > General C1Input Tasks > Creating ToolTip Text |
To show ToolTip text for any of the Input for ASP.NET Web Forms controls, enter text for the ToolTip property. For example, you can create a ToolTip text for the C1InputDate control that reads, "Enter the required date".
Using the Designer
To display a ToolTip when the user hovers over the C1InputDate control, complete the following steps:
Note that you can preview the control's ToolTip in the Designer's preview window.
Using HTML Markup
To display a ToolTip when the user hovers over the C1InputDate control, use the following markup in the .aspx page:
To write code in Source View
<cc1:C1InputDate ID="C1InputDate1" runat="server"
Date="2006-08-07"
ToolTip="Enter the required date">
</cc1:C1InputDate>
Using Code
To display a ToolTip when the user hovers over the C1InputDate control, double-click the Web page to create an event handler for the Load event. Enter the following code for the Page_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
' Set a Date Me.C1InputDate1.Date = "2006-08-07" ' Add a ToolTip Me.C1InputDate1.ToolTip = "Enter the required date" |
To write code in C#
C# |
Copy Code
|
---|---|
// Set a Date this.C1InputDate1.Date = "2006-08-07"; // Add a ToolTip this.C1InputDate1.ToolTip = "Enter the required date"; |
This topic illustrates the following:
Run the project and notice that when you hover over the C1InputDate control, the following ToolTip is displayed: