Cover
Copyright page
Acknowledgments
Contents at a Glance
Table of Contents
Introduction
Who This Book Is For
Getting Started
Finding Your Best Starting Point in This Book
Conventions and Features in This Book
Conventions
Other Features
Prerelease Software
Hardware and Software Requirements
Code Samples
Digital Content for Digital Book Readers
Installing the C# Code Samples
Using the Code Samples
Uninstalling the Code Samples
Support for This Book
We Want to Hear from You
Part I: Fundamentals
Chapter 1:
Web Application Basics
HTTP Requests
HTTP Requests from a Browser
Making HTTP Requests Without a Browser
Hypertext Markup Language
Dynamic Content
HTML Forms
Common Gateway Interface: Very Retro
The Microsoft Environment as a Web Server
Internet Information Services
Internet Services Application Programming Interface DLLs
Running Internet Information Services
Classic ASP: Putting ASP.NET into Perspective
Web Development Concepts
ASP.NET
Chapter 1 Quick Reference
Chapter 2:
ASP.NET Application Fundamentals
The Canonical Hello World Application
Mixing HTML with Executable Code
Server-Side Executable Blocks
The ASP.NET Compilation Model
Coding Options
ASP.NET 1.x Style
Modern ASP.NET Style
The ASP.NET HTTP Pipeline
The IIS 5.x and IIS 6.x Pipeline
The IIS 7.x Integrated Pipeline
Tapping the Pipeline
Visual Studio and ASP.NET
Local IIS Web Sites
File System–Based Web Sites
FTP Web Sites
Remote Web Sites
Hello World and Visual Studio
Chapter 2 Quick Reference
Chapter 3:
The Page Rendering Model
Rendering Controls as Tags
Packaging the UI as Components
The Page Using ASP.NET
The Page’s Rendering Model
The Page’s Control Tree
Adding Controls Using Visual Studio
Layout Considerations
Chapter 3 Quick Reference
Chapter 4:
Custom Rendered Controls
The Control Class
Visual Studio and Custom Controls
A Palindrome Checker
Controls and Events
HtmlTextWriter and Controls
Controls and ViewState
Chapter 4 Quick Reference
Chapter
5: Composite Controls
Composite Controls versus Rendered Controls
Custom Composite Controls
User Controls
When to Use Each Type of Control
Chapter 5 Quick Reference
Chapter
6: Control Potpourri
Validation
How Page Validation Works
Other Validators
Validator Properties
Image-Based Controls
TreeView
MultiView
Chapter 6 Quick Reference
Part II:
Advanced Features
Chapter 7:
A Consistent Look and Feel
Managing User Interface Consistency
ASP.NET Master Pages
Themes
Skins
Chapter 7 Quick Reference
Chapter 8:
Configuration
Windows Configuration
.NET Configuration
Machine.Config
Configuration Section Handlers
Web.Config
Managing Configuration in ASP.NET 1.x
Managing Configuration in Later Versions of ASP.NET
Configuring ASP.NET from IIS
Chapter 8 Quick Reference
Chapter 9:
Logging In
Web-Based Security
Securing IIS
Basic Forms Authentication
ASP.NET Authentication Services
The FormsAuthentication Class
An Optional Login Page
Managing Users
ASP.NET Login Controls
Authorizing Users
Chapter 9 Quick Reference
Chapter 10:
Data Binding
Representing Collections Without Data Binding
Representing Collections with Data Binding
ListControl-Based Controls
TreeView Control
Menu Control
FormView Control
GridView Control
DetailsView Control
DataList Control
Repeater Control
Simple Data Binding
Accessing Databases
The .NET Database Story
Connections
Commands
Managing Results
ASP.NET Data Sources
Other Data-Bound Controls
LINQ
Chapter 10 Quick Reference
Chapter 11:
Web Site Navigation
ASP.NET Navigation Support
Navigation Controls
XML Site Maps
The SiteMapProvider
The SiteMap Class
The SiteMapNode
Using Navigation Controls
The Menu and TreeView Controls
The SiteMapPath Control
Site Map Configuration
Building Navigable Web Sites
Trapping the SiteMapResolve Event
Defining Custom Attributes for Each Node
Security Trimming
URL Mapping
URL Rewriting
Chapter 11 Quick Reference
Chapter 12:
Personalization
Personalizing Web Visits
Personalization in ASP.NET
User Profiles
Personalization Providers
Using Personalization
Defining Profiles in Web.Config
Using Profile Information
Saving Profile Changes
Profiles and Users
Chapter 12 Quick Reference
Chapter 13:
Web Parts
A Brief History of Web Parts
What Good Are Web Parts?
Developing Web Parts Controls
Web Parts Page Development
Web Parts Application Development
The Web Parts Architecture
WebPartManager and WebZones
Built-In Zones
Built-In Web Parts
Developing a Web Part
Chapter 13 Quick Reference
Part III:
Caching and State Management
Chapter 14: Session State
Why Session State?
ASP.NET and Session State
Introduction to Session State
Session State and More Complex Data
Configuring Session State
Turning Off Session State
Storing Session State InProc
Storing Session State in a State Server
Storing Session State in a Database
Tracking Session State
Tracking Session State with Cookies
Tracking Session State with the URL
Using AutoDetect
Applying Device Profiles
Session State Timeouts
Other Session Configuration Settings
The Wizard Control: An Alternative to Session State
Chapter 14 Quick Reference
Chapter 15:
Application Data Caching
Getting Started with Caching
Using the Data Cache
Impact of Caching
Managing the Cache
DataSets in Memory
Cache Expirations
Cache Dependencies
The SQL Server Dependency
Clearing the Cache
Chapter 15 Quick Reference
Chapter 16:
Caching Output
Caching Page Content
Managing Cached Content
Modifying the OutputCache Directive
The HttpCachePolicy
Caching Locations
Output Cache Dependencies
Caching Profiles
Caching User Controls
When Output Caching Makes Sense
Other Cache Providers
Chapter 16 Quick Reference
Part IV:
Diagnostics and Plumbing
Chapter 17:
Diagnostics and Debugging
Page Tracing
Tracing
Trace Statements
Application Tracing
Enabling Tracing Programmatically
The TraceFinished Event
Piping Other Trace Messages
Debugging with Visual Studio
Error Pages
Unhandled Exceptions
Chapter 17 Quick Reference
Chapter 18:
The HttpApplication Class and
HTTP Modules
The Application: A Rendezvous Point
Overriding HttpApplication
HttpModules
Global.asax vs. HttpModules
Chapter 18 Quick Reference
Chapter 19:
HTTP Handlers
ASP.NET Request Handlers
The Built-in Handlers
Handlers and IHttpHandler
Handlers and Session State
Generic Handlers (ASHX Files)
Chapter 19 Quick Reference
Part V:
Dynamic Data, XBAP, MVC,
AJAX, and Silverlight
Chapter 20:
Dynamic Data
Dynamic Data Controls
Dynamic Data Details
Chapter 20 Quick Reference
Chapter 21:
ASP.NET and WPF Content
Improving Perceived Performance by Reducing
Round-Trips
What Is WPF?
How Does WPF Relate to the Web?
Loose XAML Files
XBAP Applications
WPF Content and Web Applications
What About Silverlight?
Chapter 21 Quick Reference
Chapter 22:
The ASP.NET MVC Framework
The Model-View-Controller (MVC) Architecture
ASP.NET and MVC
ASP.NET MVC vs. Web Forms
MVC and Testing
How MVC Plays with ASP.NET
Following the Request Path
Chapter 22 Quick Reference
Chapter 23:
AJAX
Rich Internet Applications
What Is AJAX?
ASP.NET and AJAX
Reasons to Use AJAX
Real-World AJAX
AJAX in Perspective
ASP.NET Server-Side Support for AJAX
ScriptManager Control
ScriptManagerProxy Control
UpdatePanel Control
UpdateProgress Control
Timer Control
AJAX Client Support
ASP.NET AJAX Control Toolkit
AJAX Control Toolkit Potpourri
Getting Familiar with AJAX
The Timer
Updating Progress
Extender Controls
The AutoComplete Extender
A Modal Pop-up Dialog-Style Component
Chapter 23 Quick Reference
Chapter 24:
Silverlight and ASP.NET
Web Applications Mature
What Is Silverlight?
Creating a Silverlight Application
Architecture
XAML
Constructing the Visual Tree
XAML and Namespaces
Compiling the Silverlight Application
Adding Silverlight Content to a Web Page
Using the Object Tag
Using the ASP.NET Silverlight Server-Side Control
Using the JavaScript Function
Controls and Events
Routed Events
Silverlight Controls and Class Members
Silverlight and Layout
Integrating with HTML
Animations
WCF Services and Silverlight
Chapter 24 Quick Reference
Part VI:
Services and Deployment
Chapter 25:
Windows Communication Foundation
Distributed Computing Redux
A Fragmented Communications API
WCF for Connected Systems
WCF Constituent Elements
Endpoints
Channels
Behaviors
Messages
How WCF Plays with ASP.NET
Side-by-Side Mode
ASP.NET Compatibility Mode
Writing a WCF Service
Building a WCF Client
Chapter 25 Quick Reference
Chapter 26:
Deployment
Visual Studio Web Sites
HTTP Web Sites
FTP Web Sites
File System Web Sites
Precompiling
Precompiling for Performance
Precompiling for Deployment
Visual Studio 2010 Deployment Support
Chapter 26 Quick Reference
Index
About the Author
Resources
Survey page