Accendo / Publikované

Ajax ModalPopupExtender postback issue

Autor:  Libor Bešenyi

Dátum:  11.7.2014


                We found a strange situation. However was content of modal dialog embedded in UpdatePanel, each post-back close down the window:

<asp:HiddenField runat="server" ID="hiddenFieldFake" />

<ajax:ModalPopupExtender ID="modalPopupExtender" runat="server" BackgroundCssClass="ModalBackground"

        DynamicServicePath="" Enabled="True" PopupControlID="panelDialog"

        TargetControlID="hiddenFieldFake" />


<asp:Panel ID="panelDialog" runat="server" CssClass="ModalPopup" Height="700px" Style="display: none;"



        <asp:UpdatePanel runat="server" ID="UpdatePanel">


                        <asp:Button runat="server" />





On the internet there is lot of situations when it is happening, however nothing was our issue. Finally we found it. This was caused with one parameter in master page which holds script manager and was optimized:

<ajax:ToolkitScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="false" />


Removing “optimization” attribute resolved our issue.