@@ -35,6 +35,55 @@ The following tutorial demonstrates how **RadToolTip** is used to provide a cust
35
35
36
36
1 . Press ** F5** to run the application. Run the mouse over the HyperLink to view the tooltip.
37
37
38
+ Example 1 - Creating RadTooltip in the aspx page
39
+
40
+ ```` ASPX
41
+ <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
42
+ <asp:HyperLink ID="HyperLink1" runat="server" Text="Telerik Web Site" NavigateUrl="https://www.telerik.com"></asp:HyperLink>
43
+ <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="HyperLink1" Position="BottomCenter"
44
+ Skin="Telerik" Title="Telerik Site Link" Width="200px" Height="60px">
45
+ <contenttemplate>
46
+ Click here to navigate to the Telerik Web Site
47
+ </contenttemplate>
48
+ </telerik:RadToolTip>
49
+ ````
50
+
51
+ Example 2 - Dynamic creation
52
+
53
+ ```` C#
54
+ protected void Page_Load (object sender , EventArgs e )
55
+ {
56
+ Button button = new Button ();
57
+ button .ID = " Button1" ;
58
+ button .Text = " Click me" ;
59
+ button .ToolTip = " This is a tooltip" ;
60
+
61
+ RadToolTip tooltip = new RadToolTip ();
62
+ tooltip .TargetControlID = " Button1" ;
63
+ tooltip .Text = " This is a tooltip" ;
64
+ tooltip .BackColor = Color .Yellow ;
65
+ tooltip .ForeColor = Color .Red ;
66
+
67
+ this .Form .Controls .Add (button );
68
+ this .Form .Controls .Add (tooltip );
69
+ }
70
+ ````
71
+ ```` VB.NET
72
+ Protected Sub Page_Load( ByVal sender As Object , ByVal e As EventArgs)
73
+ Dim button As Button = New Button()
74
+ button.ID = "Button1"
75
+ button.Text = "Click me"
76
+ button.ToolTip = "This is a tooltip"
77
+ Dim tooltip As RadToolTip = New RadToolTip()
78
+ tooltip.TargetControlID = "Button1"
79
+ tooltip.Text = "This is a tooltip"
80
+ tooltip.BackColor = Color.Yellow
81
+ tooltip.ForeColor = Color.Red
82
+ Me .Form.Controls.Add(button)
83
+ Me .Form.Controls.Add(tooltip)
84
+ End Sub
85
+ ````
86
+
38
87
# See Also
39
88
40
89
* [ FIrst Steps with RadToolTipManager] ({%slug tooltip/getting-started/first-steps-with-radtooltipmanager%})
0 commit comments