1. Home
  2. Computing & Technology
  3. Visual Basic

Learn ASP.NET 2.0 - ASP.NET 2.0 Code-Behind and Database Updating
What really happens when a page is processed

By , About.com Guide

Apr 20 2008

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.

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. Learn ASP.NET 2.0 - ASP.NET 2.0 Code-Behind and Database Updating

©2009 About.com, a part of The New York Times Company.

All rights reserved.