We have already seen that, just as in Windows forms based programs, ASP.NET relies on event subroutines to do the work. But to pick the right events to use, you have to have a clear understanding of what events are available. That is, what events take place and in what order.
Fortunately, ASP.NET gives you an easy way to see that too. In part 4, I suggested using the new Trace="True" attribute in the Page directive of the aspx file to see the change in ViewState in the ASP.NET control tree. Use the same technique to see the events that are called. In the AVBAsk program, these events are executed in this sequence:
PreInit
Init
InitComplete
PreLoad
Load
LoadComplete
PreRender
PreRenderComplete
SaveState
SaveStateComplete
Render
All of them except SaveState and Render can be intercepted with Page event subroutines. You can also code for the Unload event. This should give you all the control you need.

