Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 576
user204588 Avatar asked May 19 '10 18:05

user204588


People also ask

What is the sequence of event firing during page load of ASP.NET page?

When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering.

Which is the first event of ASP.NET page?

PreInit - PreInit is the first event in page life cycle. It checks the IsPostBack property and determines whether the page is a postback. It sets the themes and master pages, creates dynamic controls, and gets and sets profile property values.

What is PreRender event in ASP.NET c#?

PreRender is the event that takes place before the HTML for a given page is generated and sent to the browser.

What is a Page_Load event?

Page_Load is a handler for the Load event (which is automatically wired-up) and will therefore be invoked as a result of the Load event that's being raised.


1 Answers

This link should cover it: MSDN Page Life Cycle

like image 89
derek Avatar answered Sep 18 '22 00:09

derek