我如何使用 gridview 链接按钮的 Jquery ui 对话框确认?
我在 Gridview 中有一个用于删除项目的链接按钮。我想使用(jquery ui 对话框确认)与此按钮。
<asp:LinkButton ID="lnkDelete" Font-Size="12px" runat="server" CausesValidation="False" CommandName="Delete" Text="Sil"></asp:LinkButton>
我可以像这样使用 jquery ui 对话框确认:(asp.button)
function onayMesaj(msg) {
$("#divMesaj").html(msg);
$("#divMesaj").dialog({
modal: true,
bgiframe: true,
buttons: {
"Yes": function () {
<%=this.Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this.btnGuncelleEkle))%>;
},
"No": function () {
$(this).dialog("close");
}
}
});
$("#divMesaj").parent().appendTo($("form:first"));
}
我被卡住了。请帮忙。谢谢。
I have a linkbutton in Gridview for delete items. I wanna use (jquery ui dialog confirmation) with this button.
<asp:LinkButton ID="lnkDelete" Font-Size="12px" runat="server" CausesValidation="False" CommandName="Delete" Text="Sil"></asp:LinkButton>
I could use jquery ui dialog confirmation before like this: (asp.button)
function onayMesaj(msg) {
$("#divMesaj").html(msg);
$("#divMesaj").dialog({
modal: true,
bgiframe: true,
buttons: {
"Yes": function () {
<%=this.Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this.btnGuncelleEkle))%>;
},
"No": function () {
$(this).dialog("close");
}
}
});
$("#divMesaj").parent().appendTo($("form:first"));
}
I'm stuck. Please help. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过以下帖子来实现此解决方案: http://www.junnark.com/Blog /Detail/13
基本上,您的删除按钮应该是这样的:
您的 javascript 函数应该是这样的:
并且,在您的代码隐藏中,您应该有删除所选项目的命令。像这样的事情:
就是这样。希望这有帮助!
I was able to implement this solution by following this post: http://www.junnark.com/Blog/Detail/13
Basically, your delete button should be something like this:
Your javascript function should be something like this:
And, in your codebehind, you should have the command to delete the selected item. Something like this:
That's it. Hope this helps!