Sys.WebForms.EndRequestEventArgs error Property
Gets the Error object.
Note
|
|---|
|
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 error = arg.get_error();
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.
Note