Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Sys.WebForms.EndRequestEventArgs errorHandled Property

Get or sets a value that indicates whether the error has been handled.


To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.


var handled = arg.get_errorHandled();




true or false.

Return Value

true if the error has been handled; otherwise false.


Use this property to determine whether an asynchronous postback error has already been handled. If it has not and if you want to take action on the error, you can set the error as handled.


The following example shows how to use the two properties of the EndRequestEventArgs class. A click event handler for a button in an UpdatePanel control throws an ArgumentException exception to simulate an unhandled exception. In the client script, a handler for the endRequest event of the Sys.WebForms.PageRequestManager class checks the error property value. If the error is an unhandled server exception, the script sets the errorHandled property to true and displays an error message.