Avatar of sqdperu
sqdperuFlag for United States of America

asked on 

2 AJAX ModalPopupExtender pointing to single PopupControlID not working. ?

ASP.NET / VB.NET 2017 webform / AJAX toolkit

I have a panel that needs to display when either of 2 SVG circles are clicked.  I don't want to have the exact same code twice with the only difference being the Panel ID.  So I have 2 ModalPopupExtenders with a different TargetControlID on each (circle), but both pointing to the same PopupControlID.

The code is below.   If I comment out either one of the <ajaxToolkit:ModalPopupExtender /> code sections, the other one works just fine.   But when both code sections are active, clicking on either TargetControlID circle results in the web page darkening (normal) and the modal popup never appears.

What am I doing wrong?

Thanks,

        <ajaxToolkit:ModalPopupExtender 
                ID="mpeMfgPopupStart" 
                runat="server"            
                TargetControlID="circle5"
                PopupControlID="panMfgPopup"
                BackgroundCssClass="modalBackground"
                DropShadow="True"
                CancelControlID="btnMfgClose">
        </ajaxToolkit:ModalPopupExtender>


        <%-- I need 2 TargetControlID that execute the same Popup.  Just copy one and change the ID and TargetControlID --%>
        <ajaxToolkit:ModalPopupExtender 
                ID="mpeMfgPopupComplete" 
                runat="server"            
                TargetControlID="circle6"
                PopupControlID="panMfgPopup"
                BackgroundCssClass="modalBackground"
                DropShadow="True"
                CancelControlID="btnMfgClose">
        </ajaxToolkit:ModalPopupExtender>

        <asp:Panel ID="panMfgPopup" runat="server" CssClass="modalPopupMfg" style="display:none; background-color: #F7F7F7"> 

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

                <div class="header">
                    <asp:Label ID="lblMfgTitle" runat="server" Text="MANUFACTURING"></asp:Label>
                </div>
                <div class="body">
                    <table id="Manufacturing" width="100%" border="0" cellpadding="10" cellspacing="0" class="tbl_order_header">


                           The content code...


                    </table>
                </div>
              </ContentTemplate>
            </asp:UpdatePanel> 

            <hr style="border-top: 1px solid #EDEDED; background: transparent; width:690px"/>

            <div class="footer" align="right">

                <asp:Button ID="btnMfgClose" runat="server" Text="X" OnClick = "MfgClose_Click" Width="100px" Height="24px" BackColor="#EDEDED" ForeColor="#333333" Font-Bold="True" Visible="True" />
            </div>
            
            <ajaxToolkit:DragPanelExtender ID="DragPanelExtenderMfg" runat="server" TargetControlID="panMfgPopup" />

        </asp:Panel>

Open in new window

ASP.NETVisual Basic.NETAJAX

Avatar of undefined
Last Comment
sqdperu
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sqdperu
sqdperu
Flag of United States of America image

ASKER

Ryan,

Thanks for the response. Works great!   Thanks.

Avatar of sqdperu
sqdperu
Flag of United States of America image

ASKER

Thanks for your help
Avatar of sqdperu
sqdperu
Flag of United States of America image

ASKER

Thanks
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo