I want to show some data in tool tip on mouse hover. I am using datalist in asp.net. How can I show dynamic data in tool tip.The data will be based on database tables. This is the code for my datalist and I want tool tip to be shown on item template. The tooltip data will contain 3 items viz available quantity,on hand quantity and on order quantity.
EDIT: I tried ways provided in answer of this question but they are not working.
Is there any way that I can do the same using JQuery and web service? If yes then please guide me the proper way…
<asp:DataList ID="dlvProductSpecification" runat="server" RepeatColumns="10" HeaderStyle-Font-Size="16px"
Font-Size="Smaller" OnItemCommand="dlvProductSpecification_ItemCommand" OnItemCreated="dlvProductSpecification_ItemCreated"
OnItemDataBound="dlvProductSpecification_ItemDataBound">
<ItemStyle Font-Size="Smaller" />
<HeaderStyle HorizontalAlign="Center"> </HeaderStyle>
<HeaderTemplate>
<table class="header_dl">
<tr>
<td>
SPECIFICATION HEADER
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<%--<table style="text-align: center;">--%>
<table class="style_dl" onmouseover="showtooltip()" onmouseout="hidetooltip()">
<tr>
<td class="style_dl_td">
<asp:Label ID="lblReferenceNo" CssClass="labeltitle_dl" runat="server"><%# Eval("ReferenceNo")%></asp:Label>
<br />
<asp:Label ID="Label1" runat="server"><%# Eval("Specification")%></asp:Label>
<br />
<br />
<asp:HiddenField ID="hdnSpecificationID" runat="server" Value='<%# Eval("ProductSpecificationID")%>' />
<asp:HiddenField ID="hdnSpecification" runat="server" Value='<%# Eval("Specification")%>' />
<asp:HiddenField ID="hdnReferenceNo" runat="server" Value='<%# Eval("ReferenceNo")%>' />
<asp:HiddenField ID="hdnGTIN" runat="server" Value='<%# Eval("GTIN")%>' />
<asp:HiddenField ID="hdnAvailableQty" runat="server" Value='<%# Eval("AvailableQty")%>' />
<asp:Button ID="btnAddQty" runat="server" CommandName="GetData" Text="Add" /><br />
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
You can do it on ItemDataBound event. Try this: