Chapter 9. The Page Class and Master Pages


9. The Page Class and Master Pages

In 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:

  • The HttpRequest, HttpResponse, HttpServerUtility, and HttpContext classes

  • The ASP.NET Page class

  • Client-side scripting features

  • Sub-classing the Page object

  • Working with Master Pages

To start, you will see how the fundamental objects exposed by ASP.NET provide interaction with the underlying HTTP request and response model.



ASP. NET 2.0 Illustrated
ASP.NET 2.0 Illustrated
ISBN: 0321418344
EAN: 2147483647
Year: 2006
Pages: 147

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