Part I: Building ASP.NET Pages
1. Overview of the ASP.NET Framework
ASP.NET and the .NET Framework
Understanding the Framework Class Library
Understanding the Common Language Runtime
Understanding ASP.NET Controls
Understanding and Handling Control Events
Understanding Dynamic Compilation
Using the Page.IsPostBack Property
Debugging and Tracing ASP.NET Pages
2. Using the Standard Controls
Using Client Scripts with Button Controls
3. Using the Validation Controls
Overview of the Validation Controls
Validation Controls and JavaScript
Highlighting Validation Errors
Using the RequiredFieldValidator Control
Using the RangeValidator Control
Using the CompareValidator Control
Using the RegularExpressionValidator Control
Using the CustomValidator Control
Using the ValidationSummary Control
Creating Custom Validation Controls
Creating a LengthValidator Control
Creating an AjaxValidator Control
Saving Files to the File System
Rendering a Calendar from a Database Table
Storing Advertisements in an XML File
Storing Advertisements in a Database Table
Tracking Impressions and Transfers
Displaying Different Page Views
Displaying Silverlight Content
Part II: Designing ASP.NET Websites
5. Designing Websites with Master Pages
Using Images and Hyperlinks in Master Pages
Registering Master Pages in Web Configuration
Using the Page Header Property
Exposing Master Page Properties
Using FindControl with Master Pages
Loading Master Pages Dynamically
Loading Master Pages Dynamically for Multiple Content Pages
6. Designing Websites with Themes
Themes Versus StyleSheetThemes
Registering Themes in the Web Configuration File
Adding Cascading Style Sheets to Themes
Adding Multiple Cascading Style Sheets to a Theme
Changing Page Layouts with Cascading Style Sheets
7. Creating Custom Controls with User Controls
Registering User Controls in the Web Configuration File
Exposing Properties from a User Control
Exposing Events from a User Control
Creating an AddressForm Control
Dynamically Loading User Controls
Part III: Performing Data Access
Working with Tabular DataBound Controls
Working with Hierarchical DataBound Controls
Using ASP.NET Parameters with DataSource Controls
Using Programmatic DataBinding
Understanding Templates and DataBinding Expressions
Using Two-Way DataBinding Expressions
Overview of SQL Server 2008 Express
Features of SQL Server Express
SQL Server 2008 Express Management Tools
Server Databases Versus Local Databases
Sample Database-Driven Web Application
9. Using the SqlDataSource Control
Connecting to Microsoft SQL Server
Storing Connection Strings in the Web Configuration File
Executing Inline SQL Statements
Handling SQL Command Execution Errors
Using ASP.NET Parameters with the SqlDataSource Control
Using the ASP.NET Parameter Object
Using the ASP.NET ControlParameter Object
Using the ASP.NET CookieParameter Object
Using the ASP.NET FormParameter Object
Using the ASP.NET ProfileParameter Object
Using the QueryStringParameter Object
Using the SessionParameter Object
Programmatically Executing SqlDataSource Commands
Executing Insert, Update, and Delete Commands
Caching Database Data with the SqlDataSource Control
Determining the Selected List Item
Working with the DropDownList Control
Working with the RadioButtonList Control
Working with the ListBox Control
Working with the CheckBoxList Control
Working with the BulletedList Control
Creating a Custom List Control
11. Using the GridView Control
Formatting the GridView Control
Using ViewState with the GridView Control
Using Fields with the GridView Control
Working with GridView Control Events
Displaying Nested Master/Details Forms
Extending the GridView Control
12. Using the DetailsView and FormView Controls
Displaying Data with the DetailsView Control
Using Fields with the DetailsView Control
Displaying Empty Data with the DetailsView Control
Paging through Data with the DetailsView Control
Updating Data with the DetailsView Control
Inserting Data with the DetailsView Control
Deleting Data with the DetailsView Control
Working with DetailsView Control Events
Formatting the DetailsView Control
Displaying Data with the FormView Control
Paging Through Data with the FormView Control
Editing Data with the FormView Control
Inserting Data with the FormView Control
Deleting Data with the FormView Control
13. Using the Repeater and DataList Controls
Displaying Data with the Repeater Control
Using Templates with the Repeater Control
Handling Repeater Control Events
Displaying Data with the DataList Control
Displaying Data in Multiple Columns
Using Templates with the DataList Control
Selecting Data with the DataList Control
Editing Data with the DataList Control
Formatting the DataList Control
14. Using the ListView and DataPager Controls
Using the LayoutTemplate and ItemTemplate
Creating a Custom User Interface for Paging
Data Source Paging with the DataPager Control
Displaying Data with the Chart Control
Customizing a Chart’s Appearance
Customizing the Background and Plotting Area
16. Using the QueryExtender Control
Introduction to the QueryExtender Control
Querying Data with Declarative Syntax
Querying with the ControlFilterExpression
Querying with the CustomExpression
Querying with the DynamicFilterExpression
Querying with the MethodExpression
Sorting with the OrderByExpression
Querying with the PropertyExpression
Querying with the RangeExpression
Querying with the SearchExpression
Building a Sample Page with the QueryExtender Control
Components and Dynamic Compilation
Mixing Different Language Components in the App_Code Folder
Declaring Fields and Properties
Overloading Methods and Constructors
Inheritance and Abstract Classes
Using ASP.NET Intrinsics in a Component
Adding a Reference to a Class Library
Building Multitier Applications
Creating the User Interface Layer
Creating the Business Logic Layer
Creating the Data Access Layer
18. Using the ObjectDataSource Control
Representing Objects with the ObjectDataSource Control
Binding to a LINQ to SQL Query
Using Parameters with the ObjectDataSource Control
Using Different Parameter Types
Paging, Sorting, and Filtering Data with the ObjectDataSource Control
Handling ObjectDataSource Control Events
Adding and Modifying Parameters
Handling the ObjectCreating Event
Concurrency and the ObjectDataSource Control
Extending the ObjectDataSource Control
Creating a Custom ObjectDataSource Control
Creating Custom Parameter Objects
19. Building Data Access Components with ADO.NET
Executing Asynchronous Database Commands
Using Asynchronous ADO.NET Methods
Using Asynchronous ASP.NET Pages
Building Database Objects with the .NET Framework
Creating User-Defined Types with .NET Framework
Building a Data Access Layer with a User-Defined Type
Creating Stored Procedures with .NET Framework
Creating the Stored Procedure Assembly
20. Data Access with LINQ to SQL
New C# and VB.NET Language Features
Understanding Automatic Properties
Understanding Lambda Expressions
Understanding Extension Methods
Building Entities with the LINQ to SQL Designer
Using the LinqDataSource Control
Performing Standard Database Commands with LINQ to SQL
LINQ to Objects Versus LINQ to SQL
Creating a Custom LINQ Entity Base Class
Performing Standard Data-Access Operations with the EntityBase Class
Performing Validation with the EntityBase Class
21. Data Access with WCF Data Services
Using Data Services with a Service Reference
Using Data Services with a Data Context
22. Using the Navigation Controls
Formatting the SiteMapPath Control
Declaratively Adding Menu Items
Using the Menu Control with the MultiView Control
Using Templates with the Menu Control
Declaratively Adding Tree Nodes
Displaying Check Boxes with the TreeView Control
Using Populate On Demand and AJAX
Formatting the TreeView Control
Building a SQL Hierarchical Data Source Control
Using the SiteMapDataSource Control
Setting SiteMapDataSource Properties
Advanced Site Map Configuration
Creating Custom Site Map Attributes
Creating Custom Site Map Providers
Creating the AutoSiteMapProvider
Creating the SqlSiteMapProvider
Generating a Google SiteMap File
Creating a Custom UrlRemapper Module
Using the VirtualPathProvider Class
Limitations of the VirtualPathProvider Class
Understanding the VirtualPathProvider Class
Registering a VirtualPathProvider Class
25. Using the ASP.NET URL Routing Engine
Mapping URLs with Multiple Segments
Linking to Other Pages with Routes
Using Routes with Default Parameters
Overview of the Login Controls
Automatically Redirecting a User to the Referring Page
Automatically Hiding the Login Control from Authenticated Users
Using a Template with the Login Control
Performing Custom Authentication with the Login Control
Using the CreateUserWizard Control
Configuring Create User Form Fields
Sending a Create User Email Message
Automatically Redirecting a User to the Referring Page
Automatically Generating a Password
Using Templates with the CreateUserWizard Control
Adding Steps to the CreateUserWizard Control
Using the ChangePassword Control
Sending a Change Password Email
Using Templates with the ChangePassword Control
Using the PasswordRecovery Control
Requiring a Security Question and Answer
Using Templates with the PasswordRecovery Control
Using Roles with the LoginView Control
Configuring Forms Authentication
Using Cookieless Forms Authentication
Using Sliding Expiration with Forms Authentication
Using Forms Authentication Across Applications
Using Forms Authentication Across Domains
Using the FormsAuthentication Class
Using Authorization with Images and Other File Types
Using the Membership Application Programming Interface
Encrypting and Hashing User Passwords
Modifying User Password Requirements
Configuring the SQLMembershipProvider
Configuring the ActiveDirectoryMembershipProvider
Creating a Custom Membership Provider
Configuring the SqlRoleProvider
Configuring the WindowsTokenRoleProvider
Configuring the AuthorizationStoreRoleProvider
Caching Roles in a Browser Cookie
Using the Roles Application Programming Interface
Part VII: Building ASP.NET Applications
28. Maintaining Application State
Working with Multivalued Cookies
Storing Database Data in Session State
Controlling When a Session Times Out
Using Cookieless Session State
Configuring a Session State Store
Configuring SQL Server Session State
Inheriting a Profile from a Custom Class
Creating Complex Profile Properties
Accessing Profiles from Components
Configuring the Profile Provider
Creating a Custom Profile Provider
29. Caching Application Pages and Data
Varying the Output Cache by Parameter
Varying the Output Cache by Control
Varying the Output Cache by Header
Varying the Output Cache by Browser
Varying the Output Cache by a Custom Function
Creating a Page Output Cache File Dependency
Expiring the Page Output Cache Programmatically
Manipulating the Page Output Cache Programmatically
Creating Page Output Cache Profiles
Sharing a User Control Output Cache
Manipulating a User Control Cache Programmatically
Creating a User Control Cache File Dependency
Caching Dynamically Loaded User Controls
Using an Absolute Cache Expiration Policy
Using a Sliding Cache Expiration Policy
Caching with the ObjectDataSource Control
Caching with the XmlDataSource Control
Creating a DataSource Control Key Dependency
Using the Cache Application Programming Interface
Adding Items with an Absolute Expiration Policy
Adding Items with a Sliding Expiration Policy
Adding Items with Dependencies
Specifying Cache Item Priorities
Using Polling SQL Cache Dependencies
Configuring Polling SQL Cache Dependencies
Using Polling SQL Cache Dependencies with Page Output Caching
Using Polling SQL Cache Dependencies with DataSource Caching
Using Polling SQL Cache Dependencies with Data Caching
Using Push SQL Cache Dependencies
Configuring Push SQL Cache Dependencies
Using Push SQL Cache Dependencies with Page Output Caching
Using Push SQL Cache Dependencies with DataSource Caching
Using Push SQL Cache Dependencies with Data Caching
30. Localizing Applications for Multiple Languages
Automatically Detecting a Culture
Setting the Culture in the Web Configuration File
Using the CultureInfo Class to Format String Values
Comparing and Sorting String Values
Explicit Localization Expressions
Implicit Localization Expressions
Using Local Resources with Page Properties
Retrieving Local Resources Programmatically
Retrieving Global Resources Programmatically
Using Strongly Typed Localization Expressions
31. Working with the HTTP Runtime
Creating a Custom BuildProvider
Creating a Simple BuildProvider
Creating a Data Access Component BuildProvider
Creating a Custom ExpressionBuilder
Creating a Lookup ExpressionBuilder
Implementing the IHttpHandler Interface
Creating an Asynchronous HTTP Handler
Working with HTTP Applications and HTTP Modules
32. Building Dynamic Data Applications
Introducing ASP.NET Dynamic Data
Building a Dynamic Data Application
Working with Dynamic Data Templates
Making Shared Template Changes
Creating Type and Entity-Specific Templates
33. Building ASP.NET MVC Applications
Introducing the ASP.NET MVC Framework
Creating Your First ASP.NET MVC Application
Overview of Website Configuration
Using the Web Site Administration Tool
Using the ASP.NET Microsoft Management Console Snap-In
ASP.NET Configuration Sections
Applying Configuration Settings to a Particular Path
Locking Configuration Settings
Adding Custom Application Settings
Placing Configuration Settings in an External File
Reading Configuration Sections from the Current Application
Opening a Configuration File on a Remote Server
Modifying Configuration Sections
Creating Custom Configuration Sections
Creating a Configuration Element Collection
Creating Encrypted Configuration Sections
Encrypting Sections with the aspnet_regiis Tool
Encrypting Sections Programmatically
Deploying Encrypted Web Configuration Files
35. Deploying ASP.NET Web Applications
Using Web.config Transformations
One-Click Publishing Web Applications
Part VIII: Custom Control Building
Overview of Custom Control Building
Building Fully Rendered Controls
Processing Postback Data and Events
Working with Control Property Collections
Using the ParseChildren Attribute
Using the AddParsedSubObject() Method
Creating a Better Designer Experience
Applying Design-Time Attributes to a Control
Creating a Container ControlDesigner
37. Building Templated Databound Controls
Implementing the ITemplate Interface
Supporting Simplified Databinding
Supporting Two-Way Databinding
Creating Templated Databound Controls
38. Using Server-Side ASP.NET AJAX
Server-Side Ajax Versus Client-Side Ajax
Specifying UpdatePanel Triggers
Updating UpdatePanels Programmatically
UpdatePanel Server-Side Page Execution Life Cycle
UpdatePanel Client-Side Page Execution Life Cycle
Canceling the Current Asynchronous Postback
Aborting the Previous Asynchronous Postback
Passing Additional Information During an Asynchronous Postback
Handling UpdatePanel Errors Gracefully
Using the UpdateProgress Control
39. Using the ASP.NET AJAX Control Toolkit
Using the ASP.NET AJAX Control Toolkit
Overview of the Toolkit Controls
Using the AutoComplete Control
Using the AutoCompleteExtender with a Page Method
Using the AutoCompleteExtender with a Web Service Method
Using Text and Value Pairs with the AutoCompleteExtender
Using the FilteredTextBox Control
Using the UpdatePanelAnimation Control
40. Client-Side Ajax with jQuery
The $ Method and $(document).ready()
Calling Web Services from the Client