ModalPopupExtender, UpdatePanel, ProgressPanel

Last post 02-11-2009 5:02 PM by ForceMagic. 4 replies.

Sort Posts:

  • ModalPopupExtender, UpdatePanel, ProgressPanel

    10-31-2006, 2:16 PM
    • Member
      85 point Member
    • Ed.C
    • Member since 09-20-2006, 3:26 PM
    • Posts 21

    I have a ModalPopupExtender that I am using to notify users with. It uses the .Show method on the page load if a condition is met. The problem is when the popup is shown, there after any event triggered in an update panel makes the popup show again. I am able to fix this by placing the Popup in an update panel and calling the .Hide method on postback. However, this breaks the functionality of the ProgressPanel; the progress panel will not go away it keeps displaying, also all UpdatePanelAnimations become stuck just as the ProgressPanel does.

    Any suggestions are welcome,

     
    Thank you.

     

  • Re: ModalPopupExtender, UpdatePanel, ProgressPanel

    11-02-2006, 7:44 AM
    • Member
      25 point Member
    • Raithlin
    • Member since 10-04-2006, 1:45 PM
    • South Africa
    • Posts 5
    I'm having the same problem, only the .Hide() call is not helping - neither is anything else at this point. Is there perhaps a clientside function we could call to disable/hide the popup from displaying again?
  • Re: ModalPopupExtender, UpdatePanel, ProgressPanel

    11-02-2006, 9:23 AM
    Answer
    • Member
      25 point Member
    • Raithlin
    • Member since 10-04-2006, 1:45 PM
    • South Africa
    • Posts 5

    Ok, for lack of time and other options, I've fubbed the script - and got it to work.

     Instead of  

    modalPopup.Show();
     I inserted the following:  
    ClientScript.RegisterStartupScript(this.GetType(), "ModalPopup", 
      "var done=false; Sys.Application.add_load(function() {if (!done) {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer('ctl00_MainContentPlaceHolder_ModalPopupExtender1', true);} done=true; });", true);
    

     

    Brutish, perhaps, but it worked. Perhaps the next release can have a "run once" attribute for the server call...

  • Re: ModalPopupExtender, UpdatePanel, ProgressPanel

    11-02-2006, 9:47 AM
    • Member
      85 point Member
    • Ed.C
    • Member since 09-20-2006, 3:26 PM
    • Posts 21
    Thanks.
  • Re: ModalPopupExtender, UpdatePanel, ProgressPanel

    02-11-2009, 5:02 PM
    • Member
      353 point Member
    • ForceMagic
    • Member since 04-02-2008, 3:05 PM
    • MainFrame
    • Posts 93

    Raithlin:

    ClientScript.RegisterStartupScript(this.GetType(), "ModalPopup", 
      "var done=false; Sys.Application.add_load(function() {if (!done) {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer('ctl00_MainContentPlaceHolder_ModalPopupExtender1', true);} done=true; });", true);
    
     
     
    Really nice !!! I was looking for a way to call a javascript function on the page_load, but my javascript function is already written in the page. 
    So,  the Sys.Application.add_load solve my problem ! Big Smile 
    ~ ForceMagic - Aleajecta Dev Team ~

    Please click “Mark as Answer” on the post that helps you, and click “Unmark as Answer” if a marked post does not actually answer your question.
Page 1 of 1 (5 items)