【发布时间】:2017-05-29 00:49:48
【问题描述】:
我有一个带有工具提示的 ImageButton。单击按钮时,工具提示保持可见并粘在页面上的鼠标上。我希望在单击按钮后工具提示消失,但找不到执行此操作的方法。
任何建议将不胜感激! 标记:
<asp:TemplateField HeaderText="Mark as Read">
<ItemTemplate>
<asp:ImageButton ID="img_markAsRead" runat="server" ImageUrl="img/icons/eye.png" CssClass="tooltip" Width="20" ToolTip="Mark this Notification as Read" CommandName="Edit" CommandArgument='<%# Eval("notification_id")%>'/>
</ItemTemplate>
</asp:TemplateField>
CSS:
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
背后的代码:
protected void grdv_RowEditing(object sender, GridViewEditEventArgs e)
{
GridViewRow theRow = grdv_notifications.Rows[e.NewEditIndex];
ImageButton theButton = (ImageButton)theRow.FindControl("img_markAsRead");
string notificationNo = theButton.CommandArgument;
#region the clever sql statement to do the updates
#endregion
//reload the gridview
loadGridview();
//set the notification number
MasterPage master = (MasterPage)this.Master;
master.updateNotificationCount(grdv_notifications.Rows.Count);
}
【问题讨论】: