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.addComponent Method

Registers a component with the application and initializes it if the component is not already initialized. This member is static and can be invoked without creating an instance of the class.

Syntax

Sys.Application.addComponent(component);

Arguments

component

An instance of a type derived from the Component class to register with the client application.

Exceptions

Exception Type Condition

invalidOperation Function

(Debug) component does not contain a valid ID.

Remarks

Use the addComponent function to register a component with the application and to initialize it if the component is not already initialized.

Registering a component with the application also enables you to get a reference to the component or to verify that it exists. By using the findComponent method of the Sys.Application class or the $find shortcut method, you can search for registered components in the application or in any subcomponent hierarchy.