Table of Contents
getEventTarget Method 

Gets the current event target.

Syntax
JavaScript
 Callback.getEventTarget()

Return Value

The current event target.

Remarks

This function should only be called during a callback, for example, inside one of the client side event handler.

Event target provides more information about what triggered the callback. Consider a DataGrid control inside a CallbackPanel, the DataGrid can have multiple rows, each row can have several link buttons ("Edit", "Update", etc) based on a template column. This DataGrid is also set as a Callback trigger. When user clicks any of these buttons, a callback occurs. During this callback, the trigger ID is the ID of the DataGrid, but the event target is a string that uniquely identifies the button that was clicked, such as "DataGrid1:_ctr2:btnEdit", here "DataGrid1" is the ID of the DataGrid control, "_ctr2" is the automatically generated ID for the row that contains the button clicked and "btnEdit" is the ID of the button that were clicked.

See Also