툴팁이있는 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);
}
내 머리를 건 드리자 답은 간단했다.
추가 Response.Redirect("notifications.aspx");
ImageButton을 클릭 한 후 페이지를 다시로드하려면 페이지를 다시로드하고 도구 설명을 지 웠습니다. 간단하지만 효과적인!
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다