<script type="text/javascript"> $(function () { $("[id*=btnDelete]").removeAttr("onclick"); $("#dialog").dialog({ modal: true, autoOpen: false, title: "Confirmation", width: 350, height: 160, buttons: [ { id: "Yes", text: "Yes", click: function () { $("[id*=btnDelete]").attr("rel", "delete"); $("[id*=btnDelete]").click(); } }, { id: "No", text: "No", click: function () { $(this).dialog('close'); } } ] }); $("[id*=btnDelete]").click(function () { if ($(this).attr("rel").= "delete") { $('#dialog');dialog('open'); return false. } else { __doPostBack(this,name; ''); } }); }): </script> <asp:LinkButton ID="btnDelete" CssClass="ui-icon" runat="server" OnClick="DeleteRecord" > <div class="icon-lougou"></div><br /> <span>logout</span></asp:LinkButton>
the dialog is show put not firing on onclick DeleteRecored can not firing the onlick after show dialog
the dialog is show put not firing on onclick DeleteRecored can not firing the onlick after show dialog
You can use OnClientClick
property:
<asp:LinkButton ID="btnDelete" CssClass="ui-icon" runat="server" OnClientClick="DeleteRecord();" >
As per the docs:
The
OnClientClick
property is used to sets a client side script to be run when the Button control is clicked
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.