Modal Popup stops page from processing

Hi folks.

I am trying to implement the Modal Popup Extender control from the Ajax Control Toolkit into one of my forms. The intent was that I had a "please wait" blurb within the modal popup while the page processed user info in the background then, once the page was done processing, it would hide the modal popup and redirect to the next page.

What's happening, though, is that the modal popup comes up when I hit my submit button and stops the page from processing completely.

What am I doing wrong here?

Gracias!





       
       

Form:
 
<asp:ImageButton ID="submit" CssClass="form_btnTemp" runat="server" 
                            ImageUrl="~/Images/getmyquote_button.gif" onclick="submit_Click" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="submit" PopupControlID="Panel1" BackgroundCssClass="modalBackground" runat="server">
    </cc1:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display:none;">
        <img src="Images/indicator_medium.gif" alt="Please Wait." /><br /><br />Please wait while your<br />application is being submitted.</asp:Panel>
 
Code-behind:
 
protected void submit_Click(object sender, ImageClickEventArgs e)
    {
      ModalPopupExtender1.Show();
 
      Method1();
      Method2();
 
      ModalPopupExtender1.Hide();
      Response.Redirect("here.aspx");
}

Open in new window

edgartronicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zkeownCommented:
While this is a great idea, the ModalPopup won't work that way for exactly the reason you've noticed: It stops the page processing.

However, the good news is there is a control called ModalUpdateProgress you can download and install here that works great.

http://www.codeproject.com/KB/ajax/ModalUpdateProgress.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
edgartronicAuthor Commented:
Thanks! Exactly what I needed to hear.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.