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 error Property

Gets the Error Object 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.

Syntax

var error = arg.get_error();

Return Value

A base ECMAScript (JavaScript) Error object.

Remarks

The JavaScript Error object exposes several properties that define the error. The Microsoft AJAX Library provides additional functions for the Error object.

Example

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.