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.Component Class

Provides the base class for the Control and Behavior classes, and for any other object whose lifetime should be managed by Microsoft ASP.NET AJAX.

Namespace: Sys

Inherits: None

Syntax

var a = new aComponent();

Constructors

Name

Description

Component Constructor

When overridden in a derived class, initializes an instance of that class and registers it with the application as a disposable object.

Members

Name

Description

disposing Event

Raised when the dispose method of the current Component object is called.

propertyChanged Event

Raised when the raisePropertyChanged method of the current Component object is called.

beginUpdate Method

Called by the create method to indicate that the process of setting properties of a component instance has begun.

create Method

Creates and initializes a component.

dispose Method

Removes the component from the application.

endUpdate Method

Called by the create method to indicate that the process of setting properties of a component instance has finished.

initialize Method

Initializes the component.

raisePropertyChanged Method

Raises the propertyChanged event of the current Component object for a specified property.

updated Method

Called by the endUpdate method of the current Component object.

events Property

Gets an EventHandlerList object that contains references to all the event handlers that are mapped to the current component's events.

id Property

Gets or sets the ID of the current Component object.

isInitialized Property

Gets a value indicating whether the current Component object is initialized.

isUpdating Property

Gets a value indicating whether the current Component is updating.

Remarks

The Component class provides the base class for all ASP.NET AJAX client controls, behaviors, and non-visual components on the page. It also provides the static create method, available as Sys.Component.Create or as the $create shortcut method, as a means to add an instance of a component, control, or behavior to your application. The create method is preferred over Sys.Application.addComponent because it sets all the properties that are required to define a component instance on page.

The Component class implements the INotifyDisposing interface. Any object in your application can subscribe to the disposing event of a component and use the event as a signal to dispose itself or to do other work. The Component class also implements the INotifyPropertyChanged interface, and therefore raises propertyChanged events. These events can be handled internally, subscribed to by other components, or both.

For information about how to create custom components that derive from Component, see the following topics.

Topic

Description

Creating Custom ASP.NET AJAX Non-Visual Client Components

Provides a conceptual overview of how to create ASP.NET AJAX client components, and includes detailed instructions and examples.

Creating a Client Component Class Using the Prototype Model

Shows the recommended format and syntax for creating ASP.NET AJAX client components using the prototype model.

Defining Custom Component Properties and Raising PropertyChanged Events

Shows how to define custom properties and raise property-change events in ASP.NET AJAX client components.

Releasing Component Resources

Shows how to use the dispose method to release resources in ASP.NET AJAX client components.

Creating Custom ASP.NET AJAX Client Controls

Shows how to create ASP.NET AJAX client controls, and includes detailed instructions and examples.

Adding Client Behaviors to Web Server Controls by Using ASP.NET AJAX Extensions

Shows how to add ASP.NET AJAX client behaviors to server controls, and includes detailed instructions and examples.