Consider the following script block:
function pageLoad()
{
alert ('Loading Page...');
//load components
}
function pageUnload()
{
alert ('Page unloading...');
}
pageLoad is automatically executed as soon as the load event is triggered; the
pageUnload method is executed when the unload event is triggered. Once again, you do not
have to write any custom event handlers for these two methods. These two methods are
automatically wired up to their corresponding events by the Sys.Application class.
Keep in mind that there can be many more than the aforementioned three events on
a page because components in a page can expose their own sets of events. We??™ll discuss
event handling in a later section in this chapter.
CHAPTER 4 ?– ASP.NET AJAX CLIENT LIBRARIES 68
Other than events, the Sys.Application class also contains a number of methods for
managing components in a page. For instance, you can use the getComponents method to
get a list of all registered components on a page. You can also use the findComponent
method to check the existence of a component in the page.
Pages:
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130