在asp.net中可以在下拉菜单中显示工具提示吗?
Is It possible to show tooltip on dropdown in asp.net
在我的web应用程序中,我有dropdowncheckboxes控件,但我试图在选择框项目上显示工具提示。这是可能的。
I am try code:
. aspx:
<%@ Register Namespace="Saplin.Controls" Assembly="DropDownCheckBoxes" TagPrefix="asp" %>
<link rel="stylesheet" href="css/bootstrap-3.1.1.min.css" type="text/css" />
<link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
script tag
<script>
$(function () {
$("#tooltip1").tooltip();
});
</script>
<div class="tooltip1"> <asp:DropDownCheckBoxes ID="dropdown1" runat="server" UseSelectAllNode="true" UseButtons="true" OnSelectedIndexChanged="dropdown1_SelectedIndexChanged"
AutoPostBack="true"> <Style SelectBoxWidth="200" DropDownBoxBoxWidth="200" DropDownBoxBoxHeight="130" />
<Texts SelectBoxCaption="" />
</asp:DropDownCheckBoxes> <asp:Label runat="server" ID="tooltip1"></asp:Label>
cs:
protected void Page_Load(object sender, EventArgs e)
{
tooltip1.Text = dropdown1.Texts.SelectBoxCaption;
}
protected void dropdown1_SelectedIndexChanged(object sender, EventArgs e)
{
List<String> checkedList = new List<string>();
foreach (ListItem item in dropdown1.Items)
{
if (item.Selected)
{
checkedList.Add(item.Value);
}
}
dropdown1.Texts.SelectBoxCaption = String.Join(",", checkedList.ToArray());
}
工具提示不显示,谁能告诉我我在哪里做错了,我不知道。是否有任何事件显示工具提示
图片描述此处
谢谢
为列表添加工具提示
public static void BindTooltip(ListControl lc)
{
for (int i = 0; i < lc.Items.Count; i++)
{
lc.Items[i].Attributes.Add("title", lc.Items[i].Text);
}
}
相关文章:
- 悬停工具提示显示详细信息 jquery
- 如何使高图工具提示显示在饼图之外
- 如何使用JS或JQuery使工具提示显示在TD悬停上
- 如何使用 d3.js 使工具提示显示在饼图扇区附近
- 如何通过 Jquery 工具提示显示图像
- 使高图工具提示显示最靠近左侧的点的信息(即在中点不更改)
- 有没有办法强制工具提示显示在输入元素的特定位置
- 高图表工具提示显示额外数据
- 在页面加载时自动对焦 dx文本框 并将 dx工具提示显示为验证消息
- 工具提示显示在第二次悬停之后
- 如何使工具提示显示在每个图像旁边
- 如何确定ng-grid中用于工具提示显示的行索引
- Imagemap:让点击区域的工具提示显示在鼠标窗口上
- 工具提示显示在随机位置
- 显示图工具提示显示x轴的最后日期值,而不是当前值
- 如何防止默认的工具提示显示在svg元素上
- twitter引导工具提示显示在modal后面
- ASP.NET 资源 resx 字符串工具提示显示帮助
- 引导工具提示显示在模态窗口后面
- 浮动工具提示显示在线形图上,而不是条形图上