In ASP.NET 1.1 there are four major events that fire for the Page class (System.Web.UI.Page
). Here’s a hack of an explanation:
Init
- page class is instantiated in ASP.NET worker process. Advisable to instantiate private members of your class here but hold off on much else as the web UI controls can get modified in later eventsLoad
- ControlTree is created, all PostBack data has already been posted to the controls, all ViewState has been processed, this is the place to rearrange controls, visibility and dynamically create controlsPreRender
- last chance to alter web controls - you cannot OVERRIDE this eventUnload
- output has been written, and you’re just doing cleanup now
For a detailed discussion into all ten, check out 4GuysFromRolla.com