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

Initializes the application and raises the load event.

note

This function supports the client-script infrastructure and is not intended to be used directly from your code.

Syntax

Sys.Application.initialize();

Remarks

By default, ASP.NET AJAX inserts a call to the initialize method immediately before the closing </form> tag on the page. Any code that appears after the </form> tag will not be initialized as part of the application and will not have access to ASP.NET AJAX functionality.

The initialize method causes the Sys.Application class to be initialized. Application initialization can occur only one time in the page life cycle. Any subsequent calls to initialize just call the raiseLoad method.

When the application is first initialized (after the first GET request), the following processes occur:

  • After all scripts are loaded, the object creation model is started.

  • If required, components perform logic to get complex references to other components.

  • Calls to the $create method are performed in init event handlers.

  • The object creation model ends.

  • The load event is raised.

After the Application object is initialized, subsequent handlers that attach to the init event are executed immediately.

note

While scripts are loading, they can time out or to fail to load.