Solved

Issue with UpdatePanel inside a ModalPopupExtender Panel

Posted on 2013-06-12
3
334 Views
Last Modified: 2014-06-01
I have a ModalPopupExtender that is firing and showing a Panel. Inside that Panel is an UpdatePanel. The Panel has some form fields on it to gather some info, the user clicks a Preview button (trigger button for UpdatePanel) and the code fires off without a hitch. Then when I go to close the ModalPopupExtender, I get the following error:

Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.

With a button for Break, Continue, and Ignore.

Here is my ModalPopupExtender Call:

<ajaxToolkit:ModalPopupExtender runat="server" ID="ModalPopupExtender4" TargetControlID="btnSFHEnv" PopupControlID="PnlSFHEnvPopup" DropShadow="true"  BackgroundCssClass="ModalPopupCSS" />

Open in new window


And my popup Panel:

 <asp:Panel runat="server" ID="PnlSFHEnvPopup" Width="985px" BackColor="#74606c" >
    <table>
    <tr>
    <td><asp:Label ID="Label1" runat="server" Text="Custom Text 1" ForeColor="White" Font-Bold="true" /></td>
    <td><asp:Label ID="Label3" runat="server" Text="Custom Text 2" ForeColor="White" Font-Bold="true" /></td>
    <td><asp:Label ID="Label4" runat="server" Text="Custom Text 3" ForeColor="White" Font-Bold="true" /></td>
    </tr>
            <tr>
                <td><asp:TextBox runat="server" ID="txtCustomEnv1" Width="150px" /></td>
                <td><asp:TextBox runat="server" ID="txtCustomEnv2" Width="150px" /></td>
                <td><asp:TextBox runat="server" ID="txtCustomEnv3" Width="150px" /></td>
            </tr>
            <tr>
                <td colspan="3">
                    <ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender1" TargetControlID="txtCustomEnv1" WatermarkText="123 Main St." WatermarkCssClass="Watermark"  />
                    <ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender2" TargetControlID="txtCustomEnv2" WatermarkText="Suite 1000" WatermarkCssClass="Watermark"  />
                    <ajaxToolkit:TextBoxWatermarkExtender runat="server" ID="TextBoxWatermarkExtender3" TargetControlID="txtCustomEnv3" WatermarkText="City, ST  ZipCode" WatermarkCssClass="Watermark"  />
                    </td>
            </tr>
            <tr>
                <td align="center" colspan="3">
                    <asp:UpdatePanel runat="server" ID="UpdEnvPanel" UpdateMode="Conditional" >
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnEnvPreview" EventName="Click" />
                        </Triggers>
                        <ContentTemplate>
                            <table>
                                <tr>
                                    <td><asp:Button runat="server" ID="btnEnvPreview" Text="Preview" 
                        onclick="btnEnvPreview_Click" /></td>
                                </tr>
                                <tr>
                                    <td><asp:Image runat="server" ID="ImgSFHEnv_LG" ImageUrl="images/SFHEnv.jpg"/></td>
                                </tr>
                            </table>

                        </ContentTemplate>
                    </asp:UpdatePanel>                                                                                                       
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:Button runat="server" ID="btnEnvAddToCart" Text="Add to Cart" onclick="btnEnvAddToCart_Click" 
                         /></td>
            </tr>            
        </table>        
    </asp:Panel>

Open in new window


Any ideas? I tried stripping out all the excess code and it's not until I add the UpdatePanel that I start getting the error.
0
Comment
Question by:drunk_irishman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
Monica P earned 500 total points
ID: 39243929
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question