Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
ASP.NET
ASP.NET 4
Microsoft Ajax
Sys Namespace
 initialize Method
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
Sys.Application.initialize Method

Initializes the application and raises the load event.

NoteNote

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

Sys.Application.initialize();

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.

NoteNote

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

Reference

Other Resources

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker