Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
How to keep webdialog as modal after asynchronous postback
posted

 Hi,

 

 I  use webdialog as a wizard. The wizard requires heavily server-side operation. Therefore, i need to do asynchronous postback. However, if i do so, the modality of the webdialog is lost. The background shadow disappears, the webdialog comes back its initial position and the modality behavior is lost. Here is my setup roughly:

<UpdatePanel>

    <WebDialogWindow>

        <ContentPane>

        <Template>

                <asp:Button ID="Button1" OnClick="Button1_Click"> 

        </Template>

       </ContentPane>

    </WebDialogWindow>

</UpdatePanel>

 

When I click Button1, the server side operation is done but the modality of the webdialog is lost.  How can i handle this problem?

 

Thanks in advance...

 

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    This one could be very tricky. You will need to subscribe to the EndRequest client-side event of the built-in ASP.NET RequestManager and in the javascript event handler show the Modal Window again using javascript  (and the WebDialogWindow Client Side Object Model (CSOM).

    Example:

    <script type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(EndRequest);   
     
        function EndRequest (sender, args)

        {
            $find("<%= WebDialogWindow1.ClientID %>").show()

       }
       
       
    </script>

Children