We were having some really strange behavior with the AjaxControlToolkit’s ModalPopupExtender – everything was fine on one page, but not on another. One major purpose of using MPE was to wrap a common control. So, as you can imagine, we got pretty frustrated. If two pages can’t achieve consistent results with shared components, development and maintenance cost projections are less predictable (although “lower cost” goes right out the window).
After quite a bit of painstakingly slow walk-throughs of the .aspx pages, we finally discovered that one of the pages had the MPE declaration within an UpdatePanel. Since this was the misbehaving page, we simply moved the MPE outside the UpdatePanel and voilà! – it misbehaved no more.
We didn’t really dig into why our MPE inside a UpdatePanel behaved as it did – we had already burned A LOT of time on the problem and needed to push on to our deadline. One of the devs found that this post seemed to be on track, so we’ll re-visit it if we find ourselves in need of making an MPE work within a UpdatePanel.
It may be worthwhile to mention that using the debugger didn’t help a bit in this case. We spent untold hours making a little change here, checking the behavior, adding some extra debug code there, checking the behavior, etc. Painfully frustrating. But in the end it came down to hawkish eyeballing of the .aspx files.