Solved

Issue with UpdatePanel inside a ModalPopupExtender Panel

Posted on 2013-06-12
3
340 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

724 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