troubleshooting Question

2 AJAX ModalPopupExtender pointing to single PopupControlID not working. ?

Avatar of sqdperu
sqdperuFlag for United States of America asked on
ASP.NETVisual Basic.NETAJAX
4 Comments1 Solution49 ViewsLast Modified:
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

ASKER CERTIFIED SOLUTION
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 4 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 4 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004