Programming Microsoft ASP.NET 4 - Dino Esposito [597]
URL Routing
The URL Routing Engine
Original URL Rewriting API
URL Patterns and Routes
Routing in Web Forms
Defining Routes for Specific Pages
Programmatic Access to Route Values
Structure of Routes
Preventing Routing for Defined URLs
Summary
II. ASP.NET Pages and Server Controls
5. Anatomy of an ASP.NET Page
Invoking a Page
The Runtime Machinery
Resource Mappings
Representing the Requested Page
Partial Classes in ASP.NET Projects
Processing the Request
The HttpRuntime Class
The Application Factory
The HttpApplication Object
The Page Factory
The Processing Directives of a Page
The @Page Directive
The @Assembly Directive
The @Import Directive
The @Implements Directive
The @Reference Directive
The Page Class
Properties of the Page Class
Intrinsic Objects
Worker Properties
Context Properties
Methods of the Page Class
Rendering Methods
Controls-Related Methods
Script-Related Methods
Events of the Page Class
The Eventing Model
Introducing the View State
The Single Form Model
Asynchronous Pages
The Async Attribute
The AddOnPreRenderCompleteAsync Method
The Significance of PreRenderComplete
Building a Sample Asynchronous Page
The RegisterAsyncTask Method
Choosing the Right Approach
Async-Compliant Operations
The Page Life Cycle
Page Setup
The PreInit Event
The Init Event
The InitComplete Event
View-State Restoration
Processing Posted Data
The PreLoad Event
The Load Event
Handling Dynamically Created Controls
Handling the Postback
Detecting Control State Changes
Executing the Server-Side Postback Event
The LoadComplete Event
Page Finalization
The PreRender Event
The PreRenderComplete Event
The SaveStateComplete Event
Generating the Markup
The Unload Event
Summary
6. ASP.NET Core Server Controls
Generalities of ASP.NET Server Controls
Properties of the Control Class
Identifying a Server Control
Client ID Modes
ASP.NET Control Containers
View State of Controls
Visibility of a Server Control
Methods of the Control Class
Events of the Control Class
Other Features
Adaptive Rendering
Getting CSS-Friendly HTML
Browser-Sensitive Rendering
Themeable Controls
HTML Controls
Generalities of HTML Controls
The HtmlControl Base Class
Working with HTML Attributes
Hierarchy of HTML Controls
HTML Container Controls
Managing Header Information
Linking External CSS Files
Managing Meta Information
Navigating to a URL
Handling Events on the Server
The HtmlSelect Control
The HtmlTextArea Control
HTML Input Controls
Command Buttons
Controlling Validation
Detecting State Changes of Controls
Uploading Files
The HtmlImage Control
Web Controls
Generalities of Web Controls
Properties of Web Controls
Styling Web Controls
Managing the Style of Web Controls
Methods of Web Controls
Core Web Controls
Button Controls
HyperLinks
Images and Image Buttons
Check Boxes and Radio Buttons
Text Controls
Hidden Fields and File Upload
Miscellaneous Web Controls
The AdRotator Control
The Calendar Control
The Xml Control
The PlaceHolder Control
View Controls
Summary
7. Working with the Page
Dealing with Errors in ASP.NET Pages
Basics of Exception Handling
Exceptions in Action
Guidelines for Exception Handling
Basics of Page Error Handling
Default Error Pages
Page-Level Error Handling
Global Error Handling
Logging Exceptions
Robust Error Handling
Mapping Errors to Pages
The Using Custom Error Pages Handling Common HTTP Errors Getting Information About the Exception