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.Application.getComponents Method

Returns an array of all components that have been registered with the application by using the addComponent method. This member is static and can be invoked without creating an instance of the class.

Syntax

var componentArray = Sys.Application.getComponents();

Return Value

An array that contains all components that have been registered with the application by using the addComponent method.

Remarks

Use the getComponents function to retrieve an array of all components that have been registered with the client application by using the addComponent method.

Example

The following example retrieves registered components and writes their ID and type information to a <div> element.

CS

function listComponents() {
    var c = Sys.Application.getComponents();
    var s = "";
    for (var i=0; i<c.length; i++) {
        var id = c[i].get_id();
        var type = Object.getType(c[i]).getName();
        s += 'Item ' + i + ': id=' + id + ', type=' + type + '.<br />';
    }
    div1.innerHTML = s;
}