You must Sign In to post a response.
  • Category: ASP.NET

    Modal pop up getting closed as the data loads. How to solve this issue.

    Dear Friends
    I have an modal popup window with 2 button.. when i click 1st button record will be display in popup window... now my problem is records are fetched as well as displayed but my popup is closed immediately.. how i can avoid this .
  • #764668
    Hi,

    Use AJAX Modal popup extender control, this will give you best result.

    Refer below sample design for the same.


    <asp:Button ID="btnShowPopup" Text="Show Popup" runat="server" Style="display: none" />
    <cc1:ModalPopupExtender ID="mpe" runat="server" TargetControlID="btnShowPopup"
    PopupControlID="pnlPopup" BackgroundCssClass="modalBackground">
    </cc1:ModalPopupExtender>
    <asp:Panel ID="pnlPopup" runat="server" BackColor="White" Height="100px"
    Width="400px" Style="display: none">
    --design your popup table here--
    </asp:Panel>



    Hope this will helpful to you.

    If you still have any doubts refer below article
    http://www.dotnetspider.com/resources/46217-ModalPopupExtender-with-Yes-No-options-without-postback.aspx

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #764678
    Can you post the button click event code to have a quick look. Seems something is messed up in your code.

    Regards,
    Asheej T K
    Microsoft MVP[ASP.NET/IIS]
    DotNetSpider MVM

  • #764682
    Can you post your code so that we can help you better in order to resolve your issue.
    have you AJAXmodalPOPup control or Window.showModalDialog ? Please elaborate

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #764759
    Why can not you try the jquery Model Popup

    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>jQuery UI Dialog - Default functionality</title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <script>
    $(function() {
    $( "#dialog" ).dialog();
    });
    </script>
    </head>
    <body>

    <div id="dialog" title="Basic dialog">
    <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
    </div>

    </body>
    </html>


    For more reference https://jqueryui.com/dialog/

    By Nathan
    Direction is important than speed


Sign In to post your comments