ASP Controls inside window not firing events


I declare the following modal ‘dialog’ like so:



var dlg = dhxWins.createWindow(“rulesDlg”, 10, 10, 340, 180);



dlg.setText(mainToolbar.getItemToolTip(itemId));



dlg.denyResize();



dlg.denyPark();



dlg.button(“close”).hide();



dlg.button(“park”).hide();



dlg.button(“stick”).hide();



dlg.button(“help”).hide();



dlg.button(“dock”).hide();



dlg.button(“minmax1”).hide();



dlg.button(“minmax2”).hide();



document.getElementById(“rulesContainer”).style.display = “block”;



dlg.attachObject(“rulesContainer”, true);



dlg.centerOnScreen();



dlg.setModal(true);



 



The ‘rulesContainer’ is declared as:







<asp:UpdatePanel ID=“UpdatePanelRules” runat=“server” ChildrenAsTriggers=“true” UpdateMode=“Conditional”>



















































<asp:RadioButtonList ID=“SelectMode” runat=“server” OnSelectedIndexChanged=“SelectMode_SelectedIndexChanged”



AutoPostBack=“True”>



<asp:ListItem Value=“0”>Location Select Mode</asp:ListItem>



<asp:ListItem Value=“1”>Container Select Mode</asp:ListItem>



</asp:RadioButtonList>







<asp:CheckBoxList ID=“chkUnits” runat=“server” AutoPostBack=“True” OnSelectedIndexChanged=“chkUnits_SelectedIndexChanged”>



</asp:CheckBoxList>











<asp:Button ID=“btnCloseRulesDlg” runat=“server” Text=“Close” OnClick=“btnCloseRulesDlg_Click”



OnClientClick=“HideDlg(‘RulesDlg’)” />



















<asp:AsyncPostBackTrigger ControlID=“SelectMode” />



<asp:AsyncPostBackTrigger ControlID=“chkUnits” />







</asp:UpdatePanel>







The rulesContainer is not defined in a different .apsx page.



The expectation is that when the ‘btnCloseRulesDialog’ button is clicked, that the btnCloseRulesDlg_Click event will fire. This event is a server side event. Even when trying to do __doPostBack(‘btnCloseRulesDialog’ ) it is not reaching the server.



 



Your help is appreciated.



 


Hello,


you can try to place the content in a separate page and load this page into window iframe. Possibly this approach will solve the issue:


//dlg.attachObject(“rulesContainer”, true);


dlg.attachURL(“content.apsx”);


Where content “content.apsx”:
















Thanks you! This solution works great