AJAX ModalPopup Pops Behind (Under) Page Content (Negative z-index)

Posted by Aaron Hoffman on Stack Overflow See other posts from Stack Overflow or by Aaron Hoffman
Published on 2010-05-10T19:45:42Z Indexed on 2010/05/10 20:04 UTC
Read the original article Hit count: 368

I am having an issue with the AJAX ModalPopupExtender in version 40412 of the AJAX Control Toolkit (http://ajaxcontroltoolkit.codeplex.com/releases/view/43475).

The first time the ModalPopup is made visible it works correctly. The z-index is set to 6001 (and the background Div's z-index is set to 6000) and the Popup appears above everything else. If the cancel button within the ModalPopup is clicked, it also has the correct functionality, the display is set to "none" and the ModalPopup is no longer visible.

However, when the Popup is triggered again, the z-index is only set to 2000 which is still visible above everything else, but if it is canceled and triggered again it is set to -2000 which is not visible (the z-index is decreasing by 4000 each time).

I'm not sure why this is happening. Any ideas how to fix it?

Special circumstances:

  • There are multiple ModalPopup's on the page.
  • All ModalPopups are triggered in code-behind through partial-page postbacks (using the .Show() method)
  • ModalPopupExtenders are within the same UpdatePanels that are displayed as popups

© Stack Overflow or respective owner

Related posts about ajaxcontroltoolkit

Related posts about modalpopupextender