The pageLoad and pageUnload functions are the primary points where you will interact with the browser page lifecycle. The pageLoad function is automatically called after the page is initially retrieved from the web server and some script processing has occurred. The pageUnload function is then called whenever a subsequent request is initiated (for postback, partial page rendering, or even when navigating to a different application). When the page is loaded again, even during partial rendering, the pageLoad function will again be triggered. Chapter 11 discusses building custom controls and also shows additional details of the page lifecycle.
For most of the rest of the code samples in this chapter, I will omit the HTML markup and inclusion of the ScriptManager. The examples will focus on the script you will write and how to use the type system and base class library features of the AJAX Library.