try this
in html
<form id="form1" runat="server">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<div>
<table>
<tr>
<td>
<div id="dialog">
This is test Dialog
</div>
<asp:Button ID="btnSave" runat="server" Text="Button" OnClick="Button1_Click" />
</td>
</tr>
</table>
</div>
</form>
in script
<script type="text/javascript">
$(document).ready(function () {
$("#dialog").dialog({ autoOpen: false,
buttons: {
OK: function () {
$(this).dialog('close');
__doPostBack = DoPostBack;
__doPostBack('btnSave', null);
},
Close: function () {
$(this).dialog('close');
}
}
});
$("#<%=btnSave.ClientID%>").click(
function () {
$("#dialog").dialog('open');
return false;
}
);
});
function DoPostBack(eventTarget, eventArgument) {
var theForm = document.forms[0];
if (!theForm) {
theForm = document.aspnetForm;
}
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
</script>