I have a jQuery UI dialog that works great from my aspx.page
My problem is that I need to move part of the page into a usercontrol. I moved the divs and the jquery to a user control. The control pops up fine, however the server side controls fire.
Here is my code to popup the dialog.
var $partyaddress = $('#addressinformationcontent').dialog({
autoOpen: false,
modal: true,
height: 450,
width: 850,
title: 'Party Address Information'
});
$('#addressopener').click(function () {
$('#addressinformationcontent').parent().appendTo($("form:first"));
$partyaddress.dialog('open');
return false;
});
My div which is popped up in the dialog is:
<div id="addressinformationcontent">
<asp:UpdatePanel ID = "updatePanelAddress" runat="server">
<ContentTemplate>
//some asp controls here and a asp.net submit button
/ContentTemplate>
</asp:UpdatePanel>
</div>
I think I understand the problem. jquery moves the dialog outside of the Form tags using the DOM and I need to add them back. The line I have in the click function appends it back to the "form" but the usercontrol has no form tag. Oddly when I first popup the dialog, I have to push a button on the dialog to load the form fields which works fine and loads the fields. After the first postback on the dialog, all server side controls quit working. I have no idea how to fix this. Any help would be much appreciated
addressopener
a button? – James Johnson Apr 19 '12 at 21:54