[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Modal Popup stops page from processing

Posted on 2008-02-12
2
Medium Priority
?
1,198 Views
Last Modified: 2012-05-05
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

0
Comment
Question by:edgartronic
2 Comments
 
LVL 9

Accepted Solution

by:
zkeown earned 2000 total points
ID: 20884208
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
 

Author Closing Comment

by:edgartronic
ID: 31430394
Thanks! Exactly what I needed to hear.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

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

Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
There is a wide range of advantages associated with the use of ASP.NET. This is why this programming framework is used to create excellent enterprise-class websites, technologies, and web applications.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…

607 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