asp.net中列表框项目的工具提示
问题描述:
任何人都可以告诉我如何在Asp.net中使用C#显示ListBox项目的工具提示#
请帮帮我。
谢谢
Naresh
Can any one tell me how to show tooltip of ListBox items in Asp.net using C#
Please help me out.
Thanks
Naresh
答
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);
HI,
这里有些文章会向您展示将工具提示添加到列表框项目的不同方法。看看他们。
为ListBox中的每个项目显示单独的工具提示 - .NET 2.0(C#代码)
列出每个项目的工具提示框控件
ASP.NET:ListBox工具提示
谢谢
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