Hi there,
I have a pretty simple question which I'm sure somebody has come across before.
I am using an AJAX ModalPopupExtender to initiate an Ajax request.
In the event of an error I want to raise an alert and hide the Ajax ModalPopupExtender. My attempts of hiding the ModalPopup extender and displaying the exception as an alert have been unsuccessful after an exception is raised.
It seems that the show()/hide() methods of the ModalPopupExtender are disabled when there is an unhandled exception.
My first attempt was to try and hide the ModalPopupExtender by adding exception handling into the calling method, calling hide() on the ModalPopupExtender and then re-throwing the exception so that the execption is caught and displayed as an alert to the user. This didn't work.
My second attempt was to call hide() on the ModalPopupExtender within the AsyncPostBackError event of the ASP.NET Ajax scriptmanger control. This didn't work either.
Any ideas for a solution to this problem?