Calling Server side event from jQuery dialog
button click event not firing.I am firing this dialog from serverside using RegisterClientScriptBlock.
Dialog comes successfully but when I click the "save Comment" button, event does not fire.
Here is my Script:
-
<script type="text/javascript">
$(document).ready(function () {
$('#dialog-form').dialog({
autoOpen: false,
draggable: true,
width: 500,
modal: true,
title: "Event Details",
open: function (type, data) {
$(this).appendTo($("form:first"));
}
});
// $('#dialog-form').appendTo($("form:first"));
});
</script>
and here is the div which comes as a pop up:
-
<html><head>....</head>
<body>
....
<form id="form1" runat="server" autocomplete="off">
<div id="dialog-form" title="Event Details" style="width=500px">
<form>
<fieldset>
<table>
<tr>
<td style="width: 25%">
Comment:
</td>
<td style="width: 75%">
<asp:TextBox ID="txtComments" TextMode="MultiLine" Height="100px" Width="300px" runat="server"
Text="txt"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Comment Time:
</td>
<td>
<asp:Label ID="txtCommentTime" runat="server" Text="txt"></asp:Label>
</td>
</tr>
<tr>
<td>
</td>
<td align="right">
<asp:Button ID="btnSaveComment" runat="server" Text="Save Comment"
onclick="btnSaveComment_Click"/>
</td>
</tr>
</table>
</fieldset>
</form>
</body>
</div>
</form>
</html>