views:

739

answers:

2

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?

A: 

Are the controls which trigger the async post back inside the modal popup? if so, are you wrapong your modalpopup in an updatepanel?

Jack Marchetti
Yes all of the controls are contained within the same updatepanel.
chinna
A: 

I'm facing the same issue and also looking for answers there.

I tried to change the property allowCustomErrorsRedirect in the scriptManager but it didn't work, it's not possible to hide it.

davandries