The execution of each asp.net ajax page is controlled by an application object that is intstantiated in the body of the library. Whenever an asp.net ajax page is loaded in the browser, an instance of Sys._Application class is promptly created and assigned to the Sys.Application object: Sys.Application = new Sys._Application();
In additional, each asp.net ajax page is injected with the following script code:
This code is placed immediately after the closing tag of the of the page's form, and it commands the loading of any script files registered for loading with the page's script manager. Sys._Application class derives from Compnent and is the entry point point in the page hierachy to locate client-side components either bound to server controls or programmatically added to the application.
Member |
Description |
---|---|
addComponent |
Adds the specified Microsoft AJAX library component to the page hierarchy |
beginCreateComponents |
Starts adding new Microsoft AJAX library components to the page |
endCreateComponents |
Ends adding new Microsoft AJAX library components to the page |
findComponent |
Looks up the specified Microsoft AJAX library component in the page |
getComponents |
Gets the list of Microsoft AJAX library components found in the page |
initialize |
Ensures that all referenced script files are loaded |
notifyScriptLoaded |
Called by script files to notify the application object that the script has been successfully loaded |
queueScriptReference |
Queues a new script reference for loading |
removeComponent |
Removes the specified component from the page hierarchy |
Vents in the page lifetime
Event |
Description |
---|---|
Init |
Occurs when the page is first initialized |
Load |
Occurs when the page is loaded |
loadTimedOut |
Occurs when the loading step takes too much time to complete |
scriptLoadFailed |
Occurs when one script fails to load for whatever reason |
Unload |
Occurs when the page is unloaded |
No comments:
Post a Comment