tags:

views:

35

answers:

2

hi, i am trying to use the JQuery tool tip in asp.net application but no where i would find how to call this tool tip if i move my mouse over a label or textbox in asp.net

any solution on this would be great t Thank you

A: 

ASP.NET textboxes are just simple inputs that just have "fancy" ids.

Rick Strahl posted about it on his blog .

kubal5003
i want to if i take my cursor on the label i need to display some static text . that is what i am looking for
prince23
You're looking for a code given on a golden plate not for a solution. I gave you the answer, if you can't make anything out of it then that's your problem.
kubal5003
+1  A: 

The easiest way to do this is to decorate your ASP.NET controls with CSS classes, say has-tooltip, then use a jQuery selector on the class to invoke the plugin.

<asp:Label ID="MyLabel" runat="server"
           CssClass="has-tooltip"
           ToolTip="This provides some help..."
           Text="Label" />
<asp:TextBox ID="MyTB" runat="server"
             CssClass="has-tooltip"
             ToolTip="Enter your text here." />

Then in your scripts -- either injected or in mark up.

<script type="text/javascript">
   $(function() {
       $('.has-tooltip').tooltip(); // invoke plugin on all elements with class
   });
</script>
tvanfosson