Partager via


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.

Sys.Application.initialize();

Remarks

By default, when AJAX is enabled for a page, ASP.NET 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.

See Also

Reference

Sys.Application Class

Other Resources

Language Reference