What are the benefits of using OnAsyncPostBackError over Page_Error

I am currently studying the exception handling architecture for our application.

We will use heavily UpdatePanels, and we will also call Webservices.

I want to know if there is any real need to implement a handler ScriptManager.OnAsyncPostBackErrorcompared to an event Page_Errorthat seems to catch all the exceptions that are thrown in the application.

The only advantages, apparently, are the ability to customize error messages, but this can be achieved if you have access to the object itself Scriptmanager.

Are there situations in which AsynchPostBackErrorsomething is caught that Page_Errorwill not?

+3
source share
1 answer

The AsyncPostBackError event should be detected when we want to configure exceptions that occurred while sending an AJAX message.
While the Page___Error method handles an error that occurs in the page life cycle, even AJAX is not used.

For more information about AsyncPostBackError, check the following: http://www.codedigest.com/Articles/ASPNETAJAX/115_Error_Handling_in_ASPNet_Ajax_Applications.aspx

0
source

All Articles