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.BeginRequestEventArgs postBackElement Property

Gets the postback element that initiated the asynchronous postback. This property is read-only.

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 elem = arg.get_postBackElement();

Return Value

An HTML DOM element.

Example

The following example shows how to use the postBackElement property to determine which DOM element initiated the asynchronous postback. The Web page contains two buttons that cause asynchronous postbacks inside an UpdatePanel control. When you click a button, a handler for the beginRequest event of the Sys.WebForms.PageRequestManager class displays a message based on the ID of the button that caused the postback.