Layers of ASP.NET Pages

ASP.NET certainly doesn’t encourage spaghetti code. It is rigorously object-based and builds atop a family of easily extensible server-side controls. The structure of an ASP.NET page is extremely modular, with three distinct ­sections—page directives, code, and page layout.

  • Page directives Page directives set up the environment in which the page will run, specify how the HTTP run time should process the page, and determine which assumptions about the page are safe to make. Directives also let you import namespaces to simplify coding, load assemblies not currently in the Global Assembly Cache (GAC), and register new controls with custom tag names and namespace prefixes.

  • Code section The code section, with the misleading ...

Get Building Web Solutions with ASP.NET and ADO.NET 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.