views:

637

answers:

1

I am currently researching an Exception handling architecture for our App.

We will be using UpdatePanels extensively and we will also be calling webservices.

I want to know if there is any real need to implement a ScriptManager.OnAsyncPostBackError handler compared to, the Page_Error event which seems to catch all exceptions that are thrown in the App.

The only benefits appears to be the possibility to customise error messages, but that can be achieved if you have access to the Scriptmanager object itself.

Are there any situations where the AsynchPostBackError will catch something the Page_Error won't?

A: 

AsyncPostBackError event should be catpured when we want to customize exceptions occured during AJAX post back.
Whereas, Page___Error method handles error occured in the page life cycle even AJAX is not used.

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

Sachin Gaur
thanks but I've already read that article. What I wanted to know is if there are any real benefits to using the AsynchPostBack handler as opposed to the Page_Error
nialljsmith