简体   繁体   中英

Event Sequence on ASP.NET page creation

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.

此链接应涵盖它: MSDN页面生命周期

Maybe you're looking for this: 替代文字

by Leon Andrianarivony.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM