Chapter 9. Control Life Cycle, Events, and Postback


In Chapter 2, "Page Programming Model," we described how ASP.NET re-creates ­ a page and its control tree upon each request. In this chapter, we'll begin where Chapter 2 left off. We'll look at the life cycle of a control ”that is, we'll examine what a control does at various stages of processing an HTTP request. The control life cycle is the most important architectural concept that you need to understand as a control developer. Your control's life cycle dictates when your control can save and restore its state, interact with the page and other controls, perform its main processing logic, and render markup to the output stream.

In this chapter, we'll also look at the events that your control inherits from the Control class and show how you can raise additional events from your control. Furthermore, we'll describe the ASP.NET architecture that enables a control to respond to postback events and process posted form data, and we'll show how you can incorporate that functionality in your control.



Developing Microsoft ASP. NET Server Controls and Components
Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer)
ISBN: 0735615829
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net