I am loading dialog from remote page(form) and all things is work fine. but there is bit problem.
remote page is like this:
<form id="frmMsgDialog" runat="server">
<asp:scriptmanager ID="Scriptmanager1" runat="server" OnAsyncPostBackError="ScriptManager1_AsyncPostBackError"></asp:scriptmanager>
<div id="msg-page">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">...
dialog loading:
$("<div id='msg-page-container'><center style='width:250px; background-color:#fff; padding:20px'>loading...</center></div>").dialog({ autoOpen: true, modal: true, resizable: false, width: 'auto', height: 'auto', draggable: false, open:
//open dialog
function () {
$(this).load('/pages/clientArea/messageDialog.aspx?v=' + Math.ceil(Math.random() * 9999) + '&type=' + type + '&recipientId=<%=ProfileId.ToString("N") %>',
//load of dialog content completed
function () {
$(this).parent().position({ my: "center", at: "center", of: window });
});
}
});
scenario:
remote page has updatepanel. when i submit the dialog, server side validation is work and generate error. now dialog show an error.
when i make another submit, dialog generate viewstate error (error 500 - invalid viewstate).
now i close the dialog, and reopen it. all things work fine and there is no problem.
The problem is here:
when i submit the dialog for first time, update panel generate new __VIEWSTATE & __EVENETTARGET,... but previous __VIEWSTATE is exists in first load and don't cleared.
after this error, when i close the form and reopen it, updatepanel generate new __VIEWSTATE and clear previous __VIEWSTATE, so now all things work fine.
do you have any solution for first error?
I am using last version of jquery & jquery ui & .net framework 4.0