Pages, Controls, and Data

Now that you’ve learned how to create Web Forms and other ASP.NET pages, let’s look in more detail at the Page class, its life cycle, and how to use controls in conjunction with a Page.

The Page Class

Every ASP.NET page has an associated Page class. This class can be created from an ASPX page that contains a mixture of HTML and code, or it can be formed from the merger of automatically generated code and a code-behind class (as described earlier). In either case, the attributes of the <%@ Page %> directive provide some key information when this class is created, as shown in Table 16-1.

Table 16-1. Important Attributes of the <%@ Page %> Directive

Page Attribute

Description

Language

The default language for the page.

Get Microsoft® Visual J#™ .NET (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.