What exactly should be the answer of Asp.net page life cycle?
This is the most common question in interview that what is asp.net life cycle? but the a开发者_如何学JAVAnswer vary from person to person...
Answer1: Init, Load, Render and unload
Answer2: preinit, load, prerender, render and unload
answer3: preinit, init, initcompleted, preload, load prerender,
render and unload...
so which answer we should give in which context ?
To know what is the ASP.NET page life cycle, you can go to http://msdn.microsoft.com/en-us/library/ms178472.aspx where you can find the general life cycle of a page and all life cycle events.
The correct answer varies between use cases. A postback has a very different lifecycle than a get request. I have full page diagrams with very small print that only cover the basics of a typical lifecycle. Like this.
But I doubt someone wants that level of detail in an interview. I imagine being conversant in the main points, and knowing how postsbacks are different than simple gets would demonstrate the command an interviewer should be looking for.
精彩评论