Solved

Issue with UpdatePanel inside a ModalPopupExtender Panel

Posted on 2013-06-12
3
308 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
3 Comments
 
LVL 10

Accepted Solution

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now