Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to use tooltip in asp.net. when my cursor is on the driodown box of user it will be display nummber of user from the database.

so what is the solution for it...

Thanksss and regards...
Mitesh
Posted
Updated 30-Apr-12 2:11am
v2
Comments
tanweer 30-Apr-12 8:22am    
hi, when you bind your DropDownlist add this line of code
YourDropDownlist.Attributes.Add("Title", "your db data count");

Please refer following link
http://www.developerscode.com/2011/02/how-to-display-data-in-tooltip-in_3418.html[^]

this will help for u

best regards
Anil Avhad
 
Share this answer
 
v2
 
Share this answer
 
I assume that you have the number of database coming from the DB functionality already running. lets say if these number is coming in a variable x. I can show this number on tool tip as

C#
int x = 5;    //Dummy value, this will be number of users from DB     
DropDownList1.ToolTip = x.ToString();


If you need help in getting number of users from Db then thats a separate question altogether.
 
Share this answer
 
Hi,

You can bind you Tooltip properties data on change as following: ToolTip='<%# Bind("Quote_id") %>'


ASP.NET
<asp:DropDownList ID="cmbSelectMode" runat="server" AutoPostBack="True"
                        OnSelectedIndexChanged="cmbSelectMode_SelectedIndexChanged" ToolTip='<%# Bind("Quote_id") %>'>



Regards,
Saurabh
 
Share this answer
 
v2
We can implement good looking tooltips in ASP.Net using Ajax Balloon POPUP Extender Control. Below mentioned post explain all possible way of implementing tooltips in ASP.Net using Ajax Control ToolKit.

You can also download demo project from here.

http://tuvianblog.com/2012/09/25/how-to-implement-balloonpopupextender-in-asp-netc-or-ballon-popup-extender-sample-in-asp-netc/[^]
 
Share this answer
 
v2
Hi,

try following javascript code to set tooltip

C#
var ddl = document.getElementById("ddlUser");
ddl.title = 'Total '+ddl.options.length+' Users';


Hope its Help U
Best Luck
Happy Coding:)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900