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.EventHandlerList Constructor

Initializes a new instance of the EventHandlerList class.

Syntax

var e = new Sys.EventHandlerList();

Remarks

The EventHandlerList constructor creates a new instance of the EventHandlerList class, which is a dictionary to hold events and their handlers.

Every Microsoft ASP.NET AJAX component and application already contains an EventHandlerList instance in its events property, so you usually do not have to use this constructor directly.

To access the EventHandlerList instance associated with the current component or application, call this.get_events(), as shown in the following example:

cs

_clickHandler: function(event) {
    var h = this.get_events().getHandler('click');
    if (h) h(this, Sys.EventArgs.Empty);
},

This example is part of a larger example from the EventHandlerList class overview.