9. The Page Class and Master PagesIn the previous chapter, you saw the controls provided with ASP.NET and how many of the more useful of these controls are used. You also saw some discussion of the ASP.NET page architecture and event mechanism. In this chapter, you will see more details about the fundamentals of the ASP.NET Page object and the HTTP context within which your pages execute. Several objects are available that you can access when building interactive Web pages and classes that integrate with ASP.NET. However, much of the core functionality of ASP.NET comes from the Page class, which exposes a range of properties, methods, and events. The ASP.NET controls use these events, and your code can access them as well. This chapter looks at the life cycle of the ASP.NET page, and a range of the features it provides. Another major area where ASP.NET version 2.0 provides a huge advance over previous versions of ASP (and many other interactive Web programming environments) is in its provision of Master Pages. These allow you to easily and quickly create a consistent look and feel for your siteand change it when required. This chapter concentrates on:
To start, you will see how the fundamental objects exposed by ASP.NET provide interaction with the underlying HTTP request and response model. |