The following code sample shows how to add Tooltip dynamiclly
using els; //use the namespace <td align="center"> <asp:TextBox ID="txtYourControl" runat="server"></asp:TextBox> <asp:Liternal ID="ltToopTip" runat="server"></asp:Literal> </td>
On code behind....
protected void Page_Load(object sender, EventArgs e) { els.ToolTip tooltip = new els.ToolTip(); // ToolTip tooltip = new ToolTip("tooltip_files"); tooltip.Add(txtYourControl, ltToolTip, "You have enter your name here"); //If you have any other control //tooltip.Add(txtPass, ltHtmlBased, "<font color=red><b>Password must be at least 8 symbols<b></font>"); tooltip.Build(); }
We can use it any control where ever u want to use
|
| Author: Kapil Dhawan 16 Jun 2008 | Member Level: Gold Points : 1 |
Hello, Nice Try to Explain Nice Piece of Code. Keep Sharing your knowledge with us.
Regards, Kapil
|