0
我已经创建了一个博客。特定的群组成员可以在该博客中聊天。每条评论都有一个动态创建的链接按钮(“编辑” - >文本)打开JQuery对话框onclick动态创建链接按钮
单击编辑 linkbutton,我想要一个对话框弹出。我尝试了很多,但无法继续。请帮忙。
以下是我如何尝试此操作的代码片段。
在cs文件:(这是我怎么动态创建的链接按钮) (我在我的jQuery的使用lnkButtons类
LinkButton lnkUpdateComment = new LinkButton();
lnkUpdateComment.ID = "" + objBridgeNotes.BridgeNotesId;
lnkUpdateComment.Text = "edit";
lnkUpdateComment.Attributes.Add("class", "lnkButtons");
lnkUpdateComment.Click += new EventHandler(lnkUpdateComment_Click);
.js文件:
$(document).ready(function() {
$(".lnkButtons").live("click", function() {
$("#divEditComment").dialog("option", "title", "Edit the Comment");
$("#divEditComment").dialog("open");
return true;
});
$(function() {
var dlg = $("#divEditComment").dialog({
autoOpen: false,
show: "blind",
hide: "blind",
//height: 450,
minWidth: 400,
//position: ['right', 210],
buttons: {
"Update Note": function() {
var Updates = btnSubmitComment.replace(/_/g, '$');
__doPostBack(Updates, '');
}
}
});
dlg.parent().appendTo(jQuery("form:first"));
});
});
in .aspx文件:
<div id="divEditComment">
<asp:UpdatePanel ID="updComments" runat="server">
<ContentTemplate>
<div>
<table width="100%" style="text-align: center">
<tr>
<td>
<div id="divComments" runat="server">
</div>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
没有运气Rituraj。即使在这里也没有进入功能。 –
在你的html里.lnkButtons –
和你的jQuery版本应该是最新的 –