0

In a C#/ASP.NET project, we're using an ajax modalpopupextender to display a "Processing..." message to the users. We're displaying it using a Javascript call in the code of the ASP.NET page. Then, in the code behind, we're doing some database operation, and hide again the popup using "popup.hide();"

The problem is that when an exception occurs in the code behind, the popup is still displayed and the application does not handle errors as per the "customErrors" tag of the web.config.

Any idea on how to deal with this kind of issues?

Thanks, David

davandries
  • 176
  • 3
  • 12

1 Answers1

0

Can you wrap the code you are running in a try catch and make sure you call in the finally the popup.hide?

Kevin LaBranche
  • 20,908
  • 5
  • 52
  • 76
  • Sounds like a solution... But what about unhandled exceptions? – davandries Sep 15 '09 at 15:15
  • I tried this, and this is unfortunately not working. It has a strange behavior. The code-behind line "popup.hide()" seems to be executed but nothing changes on the screen, whereas the popup disappears correctly when there are no exceptions... :S – davandries Sep 15 '09 at 16:18
  • Interesting.... Well, unfortunately, that's all I can think of for this one. You seem to not be the only one to have noticed this without a real answer.... http://stackoverflow.com/questions/1095686/how-to-control-asp-net-modalpopupextender-after-asyncpostbackerror *sigh* – Kevin LaBranche Sep 15 '09 at 17:32
  • I tried with the attribute but the page is still frozen on my modalpopupextender – davandries Sep 15 '09 at 17:33