Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Can any one tell me how to show tooltip of ListBox items in Asp.net using C#
Please help me out.

Thanks

Naresh
Posted

ListItem li = new ListItem("Rajesh", "Rajesh_Value");
        li.Attributes.Add("title", "Rajesh tool tip");
        lst.Items.Add(li);
                
        li = new ListItem("Kamal", "Kamal_Value");
        li.Attributes.Add("title", "Kamal tool tip");
        lst.Items.Add(li);

        li = new ListItem("Dinesh", "Dinesh_Value");
        li.Attributes.Add("title", "Dinesh tool tip");
        lst.Items.Add(li);

        li = new ListItem("Pawan", "Pawan_Value");
        li.Attributes.Add("title", "Pawan tool tip");
        lst.Items.Add(li);
 
Share this answer
 
Comments
NareshChingu 28-Jan-13 3:39am    
Thanks for the reply.
HI,

Here are some articles that will show you different ways to add the tooltip to listbox items. Have a look into them.

Showing a Separate Tooltip for Each Item in a ListBox - .NET 2.0 (C# Code)
List box control with tooltip for each item
ASP.NET: ListBox Tooltip

Thanks
 
Share this answer
 
Comments
NareshChingu 28-Jan-13 3:39am    
Thank you so much for your answer. Your answer helped me to sove my problem.
[no name] 28-Jan-13 3:44am    
Yw...

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