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

    Need detail about popup window

    Dear Friends
    i want to show popup window when i will click button button..

    can any one guide me
  • #764641
    Hi,

    You can use ajax ModalPopupExtender. In its property named TargetControlID="buttonId" assign your button id, so that it gets open on button clock. With its property named PopupControlID="Panel1" you will be allowed to open Panel1 inside popup window.
    Try this demo's:
    http://www.aspsnippets.com/Articles/Building-Modal-Popup-using-ASPNet-AJAX-ModalPopupExtender-Control.aspx
    http://www.codeproject.com/Articles/34996/ASP-NET-AJAX-Control-Toolkit-ModalPopupExtender-Co

    Hope it helps.
    Regards,
    Shashikant Gurav
    shashikantgurav22@gmail.com

  • #764653
    Add below JavaScrit in your .aspx page and call this based on the condition.

    <script language="JavaScript">
    function ShowPopUp()
    {
    window.open('pagename.aspx','width=1000,height=450,top=0,left=0');
    }
    </script>



    In your code behind,


    if(strVal!=strVal1)
    {
    Page.RegisterStartupScript("Confirm", "<script>ShowPopUp();</script>");
    }


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

  • #764665
    Hi,

    AJAX Modal popup is the best approach to achieve this task,

    Refer below sample design for your reference..


    <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>


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

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

  • #764758
    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

  • #767151
    Nice discussion. I have no idea about popup window but after reading this I got a little bit. I must try all codes given here. Thanks for sharing new updated things with us. Continue discussion so that all can aware about it. As a windows hosting user of "www.mywindowshosting.com" I had some idea about different technologies.


Sign In to post your comments