views:

37

answers:

3

Hello,

I'm looking for a good tutorial/article that explains the exact sequence of events that takes place when a page is created. I can never remember the order. I think it's something like the parent controls Init event is called, then the child controls Init event is called, in order of the placement on the page. Also, when the control events are called, what order are they called in? For example, if a button event is raised, does this event get called before a DataList_ItemDataBound event is called if the DataList.DataBind is in the Page_Load event? So, does anyone want to try to explain or direct me to a nice article that explains all this?

thanks.

+3  A: 

This link should cover it: MSDN Page Life Cycle

derek
+1  A: 

This is a good article I refer to for these types of questions.

http://www.aspfree.com/c/a/ASP.NET/ASP.NET-Life-Cycle-and-Best-Practices/

And to answer your question specifically - Button events run after everything in Page Load is completed so if you're calling a DataBind in Page_Load, the button click event comes after that.

Shawn Steward
A: 

Maybe you're looking for this: alt text

by Leon Andrianarivony.

Alex