You are previewing Pro ASP.NET 4 in VB 2010, Third Edition.
O'Reilly logo
Pro ASP.NET 4 in VB 2010, Third Edition

Book Description

ASP.NET 4 is the latest version of Microsoft's revolutionary ASP.NET technology. It is the principal standard for creating dynamic web pages on the Windows platform. Pro ASP.NET 4 in VB 2010 raises the bar for high-quality, practical advice on learning and deploying Microsoft's dynamic web solution.

This new edition is updated with everything you need to come to grips with the latest version of ASP.NET, including coverage of ASP.NET MVC, ASP.NET AJAX 4, ASP.NET Dynamic Data, and Silverlight 3.

Seasoned .NET professionals Matthew MacDonald and Mario Szpuszta explain how you can get the most from these groundbreaking new technologies. They cover ASP.NET 4 as a whole, illustrating both the brand-new features and the functionality carried over from previous versions of ASP. This book will give you the knowledge you need to code real ASP.NET 4 applications in the best possible style.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewer
  4. Introduction
    1. What Does This Book Cover?
    2. Who Is This Book For?
    3. What Do You Need to Use This Book?
    4. Customer Support
      1. Sample Code
      2. Errata
  5. I. Core Concepts
    1. 1. Introducing ASP.NET
      1. 1.1. The Seven Pillars of ASP.NET
        1. 1.1.1. #1: ASP.NET Is Integrated with the .NET Framework
        2. 1.1.2. #2: ASP.NET Is Compiled, Not Interpreted
        3. 1.1.3. #3: ASP.NET Is Multilanguage
        4. 1.1.4. #4: ASP.NET Is Hosted by the Common Language Runtime
        5. 1.1.5. #5: ASP.NET Is Object-Oriented
        6. 1.1.6. #6: ASP.NET Supports all Browsers
        7. 1.1.7. #7: ASP.NET Is Easy to Deploy and Configure
      2. 1.2. The Evolution of ASP.NET
        1. 1.2.1. ASP.NET 1.0 and 1.1
        2. 1.2.2. ASP.NET 2.0
        3. 1.2.3. ASP.NET 3.5
          1. 1.2.3.1. LINQ
          2. 1.2.3.2. ASP.NET AJAX
        4. 1.2.4. ASP.NET 4
          1. 1.2.4.1. ASP.NET MVC
          2. 1.2.4.2. ASP.NET Dynamic Data
        5. 1.2.5. Silverlight
      3. 1.3. Summary
    2. 2. Visual Studio
      1. 2.1. Introducing Visual Studio
        1. 2.1.1. Websites and Web Projects
        2. 2.1.2. Creating a Projectless Website
          1. 2.1.2.1. The Development Language
          2. 2.1.2.2. The Framework Version
          3. 2.1.2.3. The Template
          4. 2.1.2.4. The Location
        3. 2.1.3. Designing a Web Page
          1. 2.1.3.1. Absolute Positioning
          2. 2.1.3.2. Smart Tags
          3. 2.1.3.3. Static HTML Tags
          4. 2.1.3.4. HTML Tables
          5. 2.1.3.5. Structuring HTML Markup
      2. 2.2. The Visual Studio IDE
        1. 2.2.1. Solution Explorer
        2. 2.2.2. Document Window
        3. 2.2.3. Toolbox
        4. 2.2.4. Error List and Task List
        5. 2.2.5. Server Explorer
      3. 2.3. The Code Editor
        1. 2.3.1. Adding Assembly References
        2. 2.3.2. IntelliSense and Outlining
          1. 2.3.2.1. Outlining
          2. 2.3.2.2. Member List
          3. 2.3.2.3. Error Underlining
        3. 2.3.3. Visual Studio 2010 Improvements
          1. 2.3.3.1. IntelliSense Gets More Intelligent
          2. 2.3.3.2. New Tools for Search and Navigation
          3. 2.3.3.3. Draggable Document Windows
      4. 2.4. The Code Model
        1. 2.4.1. How Code-Behind Files Are Connected to Pages
        2. 2.4.2. How Control Tags Are Connected to Page Variables
        3. 2.4.3. How Events Are Connected to Event Handlers
      5. 2.5. Web Projects
        1. 2.5.1.
          1. 2.5.1.1. Project-Based Development
        2. 2.5.2. Creating a Web Project
        3. 2.5.3. Migrating a Website from a Previous Version of Visual Studio
      6. 2.6. Visual Studio Debugging
        1. 2.6.1. Single-Step Debugging
        2. 2.6.2. Variable Watches
        3. 2.6.3. Advanced Breakpoints
      7. 2.7. The Web Development Helper
      8. 2.8. Summary
    3. 3. Web Forms
      1. 3.1. Page Processing
        1. 3.1.1. HTML Forms
        2. 3.1.2. Dynamic User Interface
        3. 3.1.3. The ASP.NET Event Model
        4. 3.1.4. Automatic Postbacks
          1. 3.1.4.1. Automatic Postbacks "Under the Hood"
        5. 3.1.5. View State
          1. 3.1.5.1. View State "Under the Hood"
          2. 3.1.5.2. View State Chunking
        6. 3.1.6. XHTML Compliance
          1. 3.1.6.1. Document Type Definitions
          2. 3.1.6.2. Configuring XHTML Rendering
          3. 3.1.6.3. Visual Studio's Default Doctype
          4. 3.1.6.4. XHTML Validation
        7. 3.1.7. Client-Side Control IDs
      2. 3.2. Web Forms Processing Stages
        1. 3.2.1. Page Framework Initialization
        2. 3.2.2. User Code Initialization
        3. 3.2.3. Validation
        4. 3.2.4. Event Handling
        5. 3.2.5. Automatic Data Binding
        6. 3.2.6. Cleanup
        7. 3.2.7. A Page Flow Example
      3. 3.3. The Page As a Control Container
        1. 3.3.1. Showing the Control Tree
        2. 3.3.2. The Page Header
        3. 3.3.3. Dynamic Control Creation
      4. 3.4. The Page Class
        1. 3.4.1. Session, Application, and Cache
        2. 3.4.2. Request
        3. 3.4.3. Response
          1. 3.4.3.1. Moving Between Pages
        4. 3.4.4. Server
          1. 3.4.4.1. HTML and URL Encoding
        5. 3.4.5. User
        6. 3.4.6. Trace
          1. 3.4.6.1. Application Tracing
          2. 3.4.6.2. Tracing with the Web Development Helper
        7. 3.4.7. Accessing the HTTP Context in Another Class
      5. 3.5. Summary
    4. 4. Server Controls
      1. 4.1. Types of Server Controls
        1. 4.1.1. The Server Control Hierarchy
      2. 4.2. HTML Server Controls
        1. 4.2.1. The HtmlControl Class
        2. 4.2.2. The HtmlContainerControl Class
        3. 4.2.3. The HtmlInputControl Class
        4. 4.2.4. The HTML Server Control Classes
        5. 4.2.5. Setting Style Attributes and Other Properties
        6. 4.2.6. Programmatically Creating Server Controls
        7. 4.2.7. Handling Server-Side Events
          1. 4.2.7.1. The ServerClick and ServerChange Events
      3. 4.3. Web Controls
        1. 4.3.1. The WebControl Base Class
        2. 4.3.2. Basic Web Control Classes
        3. 4.3.3. Units
        4. 4.3.4. Enumerations
        5. 4.3.5. Colors
        6. 4.3.6. Fonts
        7. 4.3.7. Focus
        8. 4.3.8. The Default Button
        9. 4.3.9. Scrollable Panels
        10. 4.3.10. Handling Web Control Events
          1. 4.3.10.1. The Click Event and the ImageButton Control
      4. 4.4. The List Controls
        1. 4.4.1. The Selectable List Controls
        2. 4.4.2. The BulletedList Control
      5. 4.5. Input Validation Controls
        1. 4.5.1. The Validation Controls
        2. 4.5.2. The Validation Process
        3. 4.5.3. The BaseValidator Class
        4. 4.5.4. The RequiredFieldValidator Control
        5. 4.5.5. The RangeValidator Control
        6. 4.5.6. The CompareValidator Control
        7. 4.5.7. The RegularExpressionValidator Control
        8. 4.5.8. The CustomValidator Control
        9. 4.5.9. The ValidationSummary Control
        10. 4.5.10. Using the Validators Programmatically
        11. 4.5.11. Validation Groups
      6. 4.6. Rich Controls
        1. 4.6.1. The AdRotator Control
        2. 4.6.2. The Calendar Control
      7. 4.7. Summary
    5. 5. ASP.NET Applications
      1. 5.1. Anatomy of an ASP.NET Application
        1. 5.1.1. The Application Domain
        2. 5.1.2. Application Lifetime
        3. 5.1.3. Application Updates
        4. 5.1.4. Application Directory Structure
      2. 5.2. The global.asax Application File
        1. 5.2.1. Application Events
        2. 5.2.2. Demonstrating Application Events
      3. 5.3. ASP.NET Configuration
        1. 5.3.1. The machine.config File
          1. 5.3.1.1. <machineKey>
        2. 5.3.2. The web.config File
          1. 5.3.2.1. Configuration Inheritance
          2. 5.3.2.2. Using <location> Elements
        3. 5.3.3. <system.web>
        4. 5.3.4. <system.webServer>
        5. 5.3.5. <appSettings>
        6. 5.3.6. <connectionStrings>
        7. 5.3.7. Reading and Writing Configuration Sections Programmatically
        8. 5.3.8. The Website Administration Tool (WAT)
        9. 5.3.9. Extending the Configuration File Structure
          1. 5.3.9.1. Creating a Section Class
          2. 5.3.9.2. Registering a Section Class
        10. 5.3.10. Encrypting Configuration Sections
          1. 5.3.10.1. Programmatic Encryption
          2. 5.3.10.2. Command-Line Encryption
      4. 5.4. .NET Components
        1. 5.4.1. Creating a Component
        2. 5.4.2. Using a Component Through the App_Code Directory
        3. 5.4.3. Using a Component Through the Bin Directory
      5. 5.5. Extending the HTTP Pipeline
        1. 5.5.1. HTTP Handlers
        2. 5.5.2. Creating a Custom HTTP Handler
        3. 5.5.3. Configuring a Custom HTTP Handler
        4. 5.5.4. Using Configuration-Free HTTP Handlers
        5. 5.5.5. Creating an Advanced HTTP Handler
        6. 5.5.6. Creating an HTTP Handler for Non-HTML Content
        7. 5.5.7. HTTP Modules
        8. 5.5.8. Creating a Custom HTTP Module
      6. 5.6. Summary
    6. 6. State Management
      1. 6.1. ASP.NET State Management
      2. 6.2. View State
        1. 6.2.1. A View State Example
        2. 6.2.2. Storing Objects in View State
        3. 6.2.3. Assessing View State
        4. 6.2.4. Selectively Disabling View State
        5. 6.2.5. View State Security
      3. 6.3. Transferring Information Between Pages
        1. 6.3.1. The Query String
          1. 6.3.1.1. Using the Query String
          2. 6.3.1.2. URL Encoding
        2. 6.3.2. Cross-Page Posting
          1. 6.3.2.1. Getting Page-Specific Information
          2. 6.3.2.2. Performing Cross-Page Posting in Any Event Handler
          3. 6.3.2.3. The IsPostBack and IsCrossPagePostBack Properties
          4. 6.3.2.4. Cross-Page Posting and Validation
      4. 6.4. Cookies
      5. 6.5. Session State
        1. 6.5.1. Session Architecture
        2. 6.5.2. Using Session State
        3. 6.5.3. Configuring Session State
          1. 6.5.3.1. Mode
            1. 6.5.3.1.1. Off
            2. 6.5.3.1.2. InProc
            3. 6.5.3.1.3. StateServer
            4. 6.5.3.1.4. SQLServer
            5. 6.5.3.1.5. Custom
          2. 6.5.3.2. Compression
          3. 6.5.3.3. Cookieless
          4. 6.5.3.4. Timeout
        4. 6.5.4. Securing Session State
      6. 6.6. Application State
        1. 6.6.1. Shared Application Variables
      7. 6.7. Summary
  6. II. Data Access
    1. 7. ADO.NET Fundamentals
      1. 7.1. The ADO.NET Architecture
        1. 7.1.1. ADO.NET Data Providers
        2. 7.1.2. Standardization in ADO.NET
        3. 7.1.3. Fundamental ADO.NET Classes
      2. 7.2. The Connection Class
        1. 7.2.1. Connection Strings
          1. 7.2.1.1. User Instance Connections
        2. 7.2.2. Testing a Connection
        3. 7.2.3. Connection Pooling
      3. 7.3. The Command and DataReader Classes
        1. 7.3.1. Command Basics
        2. 7.3.2. The DataReader Class
        3. 7.3.3. The ExecuteReader() Method and the DataReader
          1. 7.3.3.1. Null Values
          2. 7.3.3.2. CommandBehavior
          3. 7.3.3.3. Processing Multiple Result Sets
        4. 7.3.4. The ExecuteScalar() Method
        5. 7.3.5. The ExecuteNonQuery() Method
        6. 7.3.6. SQL Injection Attacks
        7. 7.3.7. Using Parameterized Commands
        8. 7.3.8. Calling Stored Procedures
      4. 7.4. Transactions
        1. 7.4.1. Transactions and ASP.NET Applications
          1. 7.4.1.1. Stored Procedure Transactions
          2. 7.4.1.2. Client-Initiated ADO.NET Transactions
        2. 7.4.2. Isolation Levels
        3. 7.4.3. Savepoints
      5. 7.5. Provider-Agnostic Code
        1. 7.5.1. Creating the Factory
        2. 7.5.2. Create Objects with Factory
        3. 7.5.3. A Query with Provider-Agnostic Code
      6. 7.6. Summary
    2. 8. Data Components and the DataSet
      1. 8.1. Building a Data Access Component
        1. 8.1.1. The Data Package
        2. 8.1.2. The Stored Procedures
        3. 8.1.3. The Data Utility Class
          1. 8.1.3.1. Concurrency Strategies
        4. 8.1.4. Testing the Database Component
      2. 8.2. Disconnected Data
        1. 8.2.1. Web Applications and the DataSet
        2. 8.2.2. XML Integration
      3. 8.3. The DataSet
      4. 8.4. The DataAdapter Class
        1. 8.4.1. Filling a DataSet
        2. 8.4.2. Working with Multiple Tables and Relationships
        3. 8.4.3. Searching for Specific Rows
        4. 8.4.4. Using the DataSet in a Data Access Class
        5. 8.4.5. Data Binding
      5. 8.5. The DataView Class
        1. 8.5.1. Sorting with a DataView
        2. 8.5.2. Filtering with a DataView
        3. 8.5.3. Advanced Filtering with Relationships
        4. 8.5.4. Calculated Columns
      6. 8.6. Summary
    3. 9. Data Binding
      1. 9.1. Basic Data Binding
        1. 9.1.1. Single-Value Binding
        2. 9.1.2. Other Types of Expressions
          1. 9.1.2.1. Custom Expression Builders
        3. 9.1.3. Repeated-Value Binding
          1. 9.1.3.1. Binding to a DataReader
          2. 9.1.3.2. The Rich Data Controls
          3. 9.1.3.3. Binding to a DataView
      2. 9.2. Data Source Controls
        1. 9.2.1. The Page Life Cycle with Data Binding
      3. 9.3. The SqlDataSource
        1. 9.3.1. Selecting Records
          1. 9.3.1.1. Data Binding "Under the Hood"
        2. 9.3.2. Parameterized Commands
          1. 9.3.2.1. Stored Procedures
          2. 9.3.2.2. More Parameter Types
        3. 9.3.3. Handling Errors
        4. 9.3.4. Updating Records
          1. 9.3.4.1. Strict Concurrency Checking
          2. 9.3.4.2. Updating with Stored Procedures
        5. 9.3.5. Deleting Records
        6. 9.3.6. Inserting Records
        7. 9.3.7. Disadvantages of the SqlDataSource
      4. 9.4. The ObjectDataSource
        1. 9.4.1. Selecting Records
          1. 9.4.1.1. Using a Parameterized Constructor
          2. 9.4.1.2. Using Method Parameters
        2. 9.4.2. Updating Records
        3. 9.4.3. Updating with a Data Object
          1. 9.4.3.1. Dealing with Nonstandard Method Signatures
          2. 9.4.3.2. Handling Identity Values in an Insert
      5. 9.5. The Limits of the Data Source Controls
        1. 9.5.1. The Problem
        2. 9.5.2. Adding the Extra Items
        3. 9.5.3. Handling the Extra Options with the SqlDataSource
        4. 9.5.4. Handling the Extra Options with the ObjectDataSource
      6. 9.6. Summary
    4. 10. Rich Data Controls
      1. 10.1. The GridView
        1. 10.1.1. Defining Columns
      2. 10.2. Formatting the GridView
        1. 10.2.1. Formatting Fields
        2. 10.2.2. Styles
          1. 10.2.2.1. Defining Styles
          2. 10.2.2.2. Configuring Styles with Visual Studio
        3. 10.2.3. Formatting-Specific Values
      3. 10.3. GridView Row Selection
        1. 10.3.1. Using Selection to Create a Master-Details Form
        2. 10.3.2. The SelectedIndexChanged Event
        3. 10.3.3. Using a Data Field As a Select Button
      4. 10.4. Sorting the GridView
        1. 10.4.1. Sorting with the SqlDataSource
        2. 10.4.2. Sorting with the ObjectDataSource
        3. 10.4.3. Sorting and Selection
        4. 10.4.4. Advanced Sorting
      5. 10.5. Paging the GridView
        1. 10.5.1. Automatic Paging
        2. 10.5.2. Paging and Selection
        3. 10.5.3. Custom Pagination with the ObjectDataSource
          1. 10.5.3.1. Counting the Records
          2. 10.5.3.2. A Stored Procedure to Get Paged Records
          3. 10.5.3.3. The Paged Selection Method
        4. 10.5.4. Customizing the Pager Bar
      6. 10.6. GridView Templates
        1. 10.6.1. Using Multiple Templates
        2. 10.6.2. Editing Templates in Visual Studio
        3. 10.6.3. Binding to a Method
        4. 10.6.4. Handling Events in a Template
        5. 10.6.5. Editing with a Template
          1. 10.6.5.1. Editing with Advanced Controls
          2. 10.6.5.2. Editing Without a Command Column
        6. 10.6.6. Client IDs in Templates
      7. 10.7. The ListView
        1. 10.7.1. Grouping
        2. 10.7.2. Paging
      8. 10.8. The DetailsView and FormView
        1. 10.8.1. The DetailsView
          1. 10.8.1.1. Defining Fields
          2. 10.8.1.2. Record Operations
        2. 10.8.2. The FormView
      9. 10.9. Advanced Grids
        1. 10.9.1. Summaries in the GridView
        2. 10.9.2. A Parent/Child View in a Single Table
        3. 10.9.3. Editing a Field Using a Lookup Table
        4. 10.9.4. Serving Images from a Database
          1. 10.9.4.1. Displaying Binary Data
          2. 10.9.4.2. Reading Binary Data Efficiently
          3. 10.9.4.3. Integrating Images with Other Content
        5. 10.9.5. Detecting Concurrency Conflicts
      10. 10.10. Summary
    5. 11. Caching and Asynchronous Pages
      1. 11.1. Understanding ASP.NET Caching
      2. 11.2. Output Caching
        1. 11.2.1. Declarative Output Caching
        2. 11.2.2. Caching and the Query String
        3. 11.2.3. Caching with Specific Query String Parameters
        4. 11.2.4. Custom Caching Control
        5. 11.2.5. Caching with the HttpCachePolicy Class
        6. 11.2.6. Post-Cache Substitution and Fragment Caching
          1. 11.2.6.1. Fragment Caching
          2. 11.2.6.2. Post-Cache Substitution
        7. 11.2.7. Cache Profiles
        8. 11.2.8. Cache Configuration
        9. 11.2.9. Output Caching Extensibility
          1. 11.2.9.1. Building a Custom Cache Provider
          2. 11.2.9.2. Using a Custom Cache Provider
      3. 11.3. Data Caching
        1. 11.3.1. Adding Items to the Cache
        2. 11.3.2. A Simple Cache Test
        3. 11.3.3. Cache Priorities
        4. 11.3.4. Caching with the Data Source Controls
          1. 11.3.4.1. Caching with SqlDataSource
          2. 11.3.4.2. Caching with ObjectDataSource
      4. 11.4. Cache Dependencies
        1. 11.4.1. File and Cache Item Dependencies
        2. 11.4.2. Aggregate Dependencies
        3. 11.4.3. The Item Removed Callback
        4. 11.4.4. Understanding SQL Cache Notifications
        5. 11.4.5. How Cache Notifications Work
        6. 11.4.6. Enabling Notifications
        7. 11.4.7. Creating the Cache Dependency
      5. 11.5. Custom Cache Dependencies
        1. 11.5.1. A Basic Custom Cache Dependency
        2. 11.5.2. A Custom Cache Dependency Using Message Queues
      6. 11.6. Asynchronous Pages
        1. 11.6.1. Creating an Asynchronous Page
        2. 11.6.2. Querying Data in an Asynchronous Page
        3. 11.6.3. Handling Errors
        4. 11.6.4. Using Caching with Asynchronous Tasks
        5. 11.6.5. Multiple Asynchronous Tasks and Timeouts
      7. 11.7. Summary
    6. 12. Files and Streams
      1. 12.1. Working with the File System
        1. 12.1.1. The Directory and File Classes
        2. 12.1.2. The DirectoryInfo and FileInfo Classes
        3. 12.1.3. The DriveInfo Class
        4. 12.1.4. Working with Attributes
        5. 12.1.5. Filter Files with Wildcards
        6. 12.1.6. Retrieving File Version Information
        7. 12.1.7. The Path Class
        8. 12.1.8. A File Browser
      2. 12.2. Reading and Writing Files with Streams
        1. 12.2.1. Text Files
        2. 12.2.2. Binary Files
        3. 12.2.3. Uploading Files
        4. 12.2.4. Making Files Safe for Multiple Users
          1. 12.2.4.1. Creating Unique Filenames
          2. 12.2.4.2. Locking File Access Objects
        5. 12.2.5. Compression
      3. 12.3. Serialization
      4. 12.4. Summary
    7. 13. LINQ
      1. 13.1. LINQ Basics
        1. 13.1.1. Deferred Execution
        2. 13.1.2. How LINQ Works
        3. 13.1.3. LINQ Expressions
          1. 13.1.3.1. Projections
          2. 13.1.3.2. Filtering and Sorting
          3. 13.1.3.3. Grouping and Aggregation
        4. 13.1.4. LINQ Expressions "Under the Hood"
          1. 13.1.4.1. Extension Methods
          2. 13.1.4.2. Lambda Expressions
          3. 13.1.4.3. Multipart Expressions
      2. 13.2. LINQ to DataSet
        1. 13.2.1. Typed DataSets
        2. 13.2.2. Null Values
      3. 13.3. LINQ to Entities
        1. 13.3.1. Generating the Data Model
        2. 13.3.2. The Data Model Classes
          1. 13.3.2.1. The Derived Object Context Class
          2. 13.3.2.2. The Entity Classes
        3. 13.3.3. Entity Relationships
          1. 13.3.3.1. One-to-Many Relationships
          2. 13.3.3.2. One-to-One Relationships
        4. 13.3.4. Querying Stored Procedures
        5. 13.3.5. LINQ to Entities Queries "Under the Hood"
          1. 13.3.5.1. Filtering Too Late
          2. 13.3.5.2. Using Lazy and Eager Data Loading
          3. 13.3.5.3. Using Explicit Loading
          4. 13.3.5.4. Compiling Queries
      4. 13.4. Database Operations
        1. 13.4.1. Inserts
          1. 13.4.1.1. Creating Partially Populated Entity Classes
          2. 13.4.1.2. Inserting Associated Entities
        2. 13.4.2. Updates
        3. 13.4.3. Deletes
        4. 13.4.4. Managing Concurrency
        5. 13.4.5. Handling Concurrency Conflicts
      5. 13.5. The EntityDataSource Control
        1. 13.5.1. Displaying Data
        2. 13.5.2. Getting Related Data
        3. 13.5.3. Editing Data
        4. 13.5.4. Validation
      6. 13.6. Using the QueryExtender Control
        1. 13.6.1. Using a SearchExpression
        2. 13.6.2. Using a RangeExpression
        3. 13.6.3. Using a PropertyExpression
        4. 13.6.4. Using a MethodExpression
      7. 13.7. Summary
    8. 14. XML
      1. 14.1. When Does Using XML Make Sense?
      2. 14.2. An Introduction to XML
        1. 14.2.1. The Advantages of XML
        2. 14.2.2. Well-Formed XML
        3. 14.2.3. XML Namespaces
        4. 14.2.4. XML Schemas
      3. 14.3. Stream-Based XML Processing
        1. 14.3.1. Writing XML Files
        2. 14.3.2. Reading XML Files
      4. 14.4. In-Memory XML Processing
        1. 14.4.1. The XmlDocument
        2. 14.4.2. The XPathNavigator
        3. 14.4.3. The XDocument
          1. 14.4.3.1. Creating XML with XDocument
          2. 14.4.3.2. Reading XML with XDocument
          3. 14.4.3.3. Namespaces
      5. 14.5. Searching XML Content
        1. 14.5.1. Searching with XmlDocument
        2. 14.5.2. Searching XmlDocument with XPath
        3. 14.5.3. Searching XDocument with LINQ
      6. 14.6. Validating XML Content
        1. 14.6.1. A Basic Schema
        2. 14.6.2. Validating with XmlDocument
        3. 14.6.3. Validating with XDocument
      7. 14.7. Transforming XML Content
        1. 14.7.1. A Basic Stylesheet
        2. 14.7.2. Using XslCompiledTransform
        3. 14.7.3. Using the Xml Control
        4. 14.7.4. Transforming XML with LINQ to XML
      8. 14.8. XML Data Binding
        1. 14.8.1. Nonhierarchical Binding
        2. 14.8.2. Using XPath
        3. 14.8.3. Nested Grids
        4. 14.8.4. Hierarchical Binding with the TreeView
        5. 14.8.5. Using XSLT
        6. 14.8.6. Binding to XML Content from Other Sources
        7. 14.8.7. Updating XML Through the XmlDataSource
      9. 14.9. XML and the ADO.NET DataSet
        1. 14.9.1. Converting the DataSet to XML
      10. 14.10. Summary
  7. III. Building ASP.NET Websites
    1. 15. User Controls
      1. 15.1. User Control Basics
        1. 15.1.1. Creating a Simple User Control
        2. 15.1.2. Converting a Page to a User Control
      2. 15.2. Adding Code to a User Control
        1. 15.2.1. Handling Events
        2. 15.2.2. Adding Properties
        3. 15.2.3. Using Custom Objects
        4. 15.2.4. Adding Events
        5. 15.2.5. Exposing the Inner Web Control
      3. 15.3. Dynamically Loading User Controls
        1. 15.3.1. Portal Frameworks
      4. 15.4. Partial Page Caching
        1. 15.4.1. VaryByControl
        2. 15.4.2. Sharing Cached Controls
      5. 15.5. Summary
    2. 16. Themes and Master Pages
      1. 16.1. Cascading Style Sheets
        1. 16.1.1. Creating a Stylesheet
        2. 16.1.2. Applying Stylesheet Rules
      2. 16.2. Themes
        1. 16.2.1. Theme Folders and Skins
        2. 16.2.2. Applying a Simple Theme
        3. 16.2.3. Handling Theme Conflicts
        4. 16.2.4. Creating Multiple Skins for the Same Control
        5. 16.2.5. Skins with Templates and Images
        6. 16.2.6. Using CSS in a Theme
        7. 16.2.7. Applying Themes Through a Configuration File
        8. 16.2.8. Applying Themes Dynamically
      3. 16.3. Standardizing Website Layout
      4. 16.4. Master Page Basics
        1. 16.4.1. A Simple Master Page
        2. 16.4.2. A Simple Content Page
        3. 16.4.3. Default Content
        4. 16.4.4. Master Pages with Tables and CSS Layout
        5. 16.4.5. Master Pages and Relative Paths
        6. 16.4.6. Applying Master Pages Through a Configuration File
      5. 16.5. Advanced Master Pages
        1. 16.5.1. Interacting with the Master Page Class
        2. 16.5.2. Dynamically Setting a Master Page
        3. 16.5.3. Nesting Master Pages
      6. 16.6. Summary
    3. 17. Website Navigation
      1. 17.1. Pages with Multiple Views
        1. 17.1.1. The MultiView Control
        2. 17.1.2. The Wizard Control
          1. 17.1.2.1. Wizard Steps
          2. 17.1.2.2. Wizard Events
          3. 17.1.2.3. Wizard Styles, Templates, and Layout
      2. 17.2. Site Maps
        1. 17.2.1. Defining a Site Map
        2. 17.2.2. Binding to a Site Map
        3. 17.2.3. Breadcrumbs
        4. 17.2.4. Showing a Portion of the Site Map
          1. 17.2.4.1. Skipping the Root Node
          2. 17.2.4.2. Starting from the Current Node
          3. 17.2.4.3. Starting from a Specific Node
        5. 17.2.5. The Site Map Objects
        6. 17.2.6. Adding Custom Site Map Information
        7. 17.2.7. Creating a Custom SiteMapProvider
          1. 17.2.7.1. Storing Site Map Information in a Database
          2. 17.2.7.2. Creating the Site Map Provider
          3. 17.2.7.3. Adding Sorting
          4. 17.2.7.4. Adding Caching
        8. 17.2.8. Security Trimming
      3. 17.3. URL Mapping and Routing
        1. 17.3.1. URL Mapping
        2. 17.3.2. URL Routing
      4. 17.4. The TreeView Control
        1. 17.4.1. The TreeNode
        2. 17.4.2. Populating Nodes on Demand
        3. 17.4.3. TreeView Styles
          1. 17.4.3.1. Applying Styles to Node Types
          2. 17.4.3.2. Applying Styles to Node Levels
          3. 17.4.3.3. TreeView Images
      5. 17.5. The Menu Control
        1. 17.5.1. Menu Styles
        2. 17.5.2. Menu Templates
      6. 17.6. Summary
    4. 18. Website Deployment
      1. 18.1. Installing and Configuring IIS
        1. 18.1.1. Installing IIS 7
        2. 18.1.2. Managing IIS 7
      2. 18.2. Deploying a Website
        1. 18.2.1. Deploying by Copying Files
          1. 18.2.1.1. Preparing IIS
          2. 18.2.1.2. The Website
          3. 18.2.1.3. Deploying the Website
          4. 18.2.1.4. Configuring the Deployment
        2. 18.2.2. Using Web Deployment
          1. 18.2.2.1. Preparing IIS
          2. 18.2.2.2. The Website
          3. 18.2.2.3. Transforming web.config
            1. 18.2.2.3.1. Setting an Attribute
            2. 18.2.2.3.2. Inserting Elements
            3. 18.2.2.3.3. Replacing Sections
            4. 18.2.2.3.4. Removing Elements
          4. 18.2.2.4. Publishing Databases
          5. 18.2.2.5. Deploying the Website
        3. 18.2.3. Using FTP Deployment
          1. 18.2.3.1. Preparing IIS
          2. 18.2.3.2. The Website
          3. 18.2.3.3. Deploying the Website
          4. 18.2.3.4. Variation: Deploying a Project-less Website
      3. 18.3. Managing a Website
        1. 18.3.1. Creating a New Site
        2. 18.3.2. Creating Virtual Directories
        3. 18.3.3. Using the VirtualPathProvider
        4. 18.3.4. Using Application Pools
          1. 18.3.4.1. Creating a New Application Pool
          2. 18.3.4.2. Assigning an Application to an Application Pool
          3. 18.3.4.3. Starting and Stopping an Application Pool
          4. 18.3.4.4. Using Side-by-Side Execution
        5. 18.3.5. Using Application Warm-Up
          1. 18.3.5.1. Preparing IIS 7
          2. 18.3.5.2. Configuring Application Warm-Up
      4. 18.4. Extending the Integrated Pipeline
        1. 18.4.1. Creating the Handler
        2. 18.4.2. Deploying the Handler
        3. 18.4.3. Configuring the Handler
        4. 18.4.4. Testing the Handler
      5. 18.5. Summary
  8. IV. Security
    1. 19. The ASP.NET Security Model
      1. 19.1. What It Means to Create Secure Software
        1. 19.1.1. Understanding Potential Threats
        2. 19.1.2. Secure Coding Guidelines
        3. 19.1.3. Understanding Gatekeepers
      2. 19.2. Understanding the Levels of Security
        1. 19.2.1. Authentication
          1. 19.2.1.1. Impersonation
        2. 19.2.2. Authorization
        3. 19.2.3. Confidentiality and Integrity
        4. 19.2.4. Pulling It All Together
      3. 19.3. Understanding Secure Sockets Layer
        1. 19.3.1. Understanding Certificates
        2. 19.3.2. Understanding SSL
        3. 19.3.3. Configuring SSL in IIS 7.x
          1. 19.3.3.1. Configuring Bindings for SSL
          2. 19.3.3.2. Encoding Information with SSL
      4. 19.4. Summary
    2. 20. Forms Authentication
      1. 20.1. Introducing Forms Authentication
        1. 20.1.1. Why Use Forms Authentication?
          1. 20.1.1.1. Controlling the Authentication Code
          2. 20.1.1.2. Controlling the Appearance of the Login Form
          3. 20.1.1.3. Working with a Range of Browsers
          4. 20.1.1.4. Storing User Information
        2. 20.1.2. Why Would You Not Use Forms Authentication?
          1. 20.1.2.1. Creating Your Own Login Interface
          2. 20.1.2.2. Maintaining User Details
          3. 20.1.2.3. Intercepting Network Traffic
        3. 20.1.3. Why Not Implement Cookie Authentication Yourself?
          1. 20.1.3.1. Keeping the Authentication Cookie Secure
          2. 20.1.3.2. Forms Authentication Is Well Tested
          3. 20.1.3.3. Integrating with the ASP.NET Security Framework
        4. 20.1.4. The Forms Authentication Classes
      2. 20.2. Implementing Forms Authentication
        1. 20.2.1. Configuring Forms Authentication
          1. 20.2.1.1. Credentials Store in web.config
        2. 20.2.2. Denying Access to Anonymous Users
        3. 20.2.3. Creating a Custom Login Page
          1. 20.2.3.1. Logging Out
          2. 20.2.3.2. Hashing Passwords in web.config
          3. 20.2.3.3. Cookieless Forms Authentication
        4. 20.2.4. Custom Credentials Store
        5. 20.2.5. Persistent Cookies in Forms Authentication
      3. 20.3. IIS 7.x and Forms Authentication
      4. 20.4. Summary
    3. 21. Membership
      1. 21.1. Introducing the ASP.NET Membership API
      2. 21.2. Using the Membership API
        1. 21.2.1. Configuring Forms Authentication
        2. 21.2.2. Creating the Data Store
          1. 21.2.2.1. Database Scripts for ASP.NET Services
          2. 21.2.2.2. File-Based SQL Server Store
        3. 21.2.3. Configuring Connection String and Membership Provider
        4. 21.2.4. Creating and Authenticating Users
      3. 21.3. Using the Security Controls
        1. 21.3.1. The Login Control
          1. 21.3.1.1. Templates and the Login Control
          2. 21.3.1.2. Programming the Login Control
        2. 21.3.2. The LoginStatus Control
        3. 21.3.3. The LoginView Control
        4. 21.3.4. The PasswordRecovery Control
          1. 21.3.4.1. PasswordRecovery Templates
        5. 21.3.5. The ChangePassword Control
        6. 21.3.6. The CreateUserWizard Control
      4. 21.4. Configuring Membership in IIS 7.x
        1. 21.4.1. Configuring Providers and Users
        2. 21.4.2. Using the Membership API with Other Applications
      5. 21.5. Using the Membership Class
        1. 21.5.1. Retrieving Users from the Store
        2. 21.5.2. Updating Users in the Store
        3. 21.5.3. Creating and Deleting Users
        4. 21.5.4. Validating Users
      6. 21.6. Summary
    4. 22. Windows Authentication
      1. 22.1. Introducing Windows Authentication
        1. 22.1.1. Why Use Windows Authentication?
        2. 22.1.2. Why Would You Not Use Windows Authentication?
        3. 22.1.3. Mechanisms for Windows Authentication
          1. 22.1.3.1. Basic Authentication
          2. 22.1.3.2. Digest Authentication
          3. 22.1.3.3. Integrated Windows Authentication
            1. 22.1.3.3.1. NTLAN Manager Authentication
            2. 22.1.3.3.2. Kerberos Authentication: A Short Introduction
      2. 22.2. Implementing Windows Authentication
        1. 22.2.1. Configuring IIS 7.x
        2. 22.2.2. Configuring ASP.NET
        3. 22.2.3. Deeper Into the IIS 7.x Pipeline
        4. 22.2.4. Denying Access to Anonymous Users
        5. 22.2.5. Accessing Windows User Information
          1. 22.2.5.1. The WindowsPrincipal Class
          2. 22.2.5.2. The WindowsIdentity Class
          3. 22.2.5.3. IdentityReference and Role Information
      3. 22.3. Impersonation
        1. 22.3.1. Impersonation and Delegation in Windows
        2. 22.3.2. Configured Impersonation
        3. 22.3.3. Programmatic Impersonation
          1. 22.3.3.1. Getting a Token
          2. 22.3.3.2. Performing the Impersonation
      4. 22.4. Summary
    5. 23. Authorization and Roles
      1. 23.1. URL Authorization
        1. 23.1.1. Authorization Rules
          1. 23.1.1.1. Controlling Access for Specific Users
          2. 23.1.1.2. Controlling Access to Specific Directories
          3. 23.1.1.3. Controlling Access to Specific Files
          4. 23.1.1.4. Controlling Access for Specific Roles
      2. 23.2. File Authorization
      3. 23.3. Authorization Checks in Code
        1. 23.3.1. Using the IsInRole() Method
        2. 23.3.2. Using the PrincipalPermission Class
          1. 23.3.2.1. Merging PrincipalPermission Objects
          2. 23.3.2.2. Using the PrincipalPermission Attribute
      4. 23.4. Using the Roles API for Role-Based Authorization
        1. 23.4.1. Using the LoginView Control with Roles
        2. 23.4.2. Accessing Roles Programmatically
        3. 23.4.3. Using the Roles API with Windows Authentication
      5. 23.5. Authorization and Roles in IIS 7.x
        1. 23.5.1. Authorization with ASP.NET Roles in IIS 7.x
        2. 23.5.2. Managing ASP.NET Roles with IIS 7.x
      6. 23.6. Summary
    6. 24. Profiles
      1. 24.1. Understanding Profiles
        1. 24.1.1. Profile Performance
        2. 24.1.2. How Profiles Store Data
        3. 24.1.3. Profiles and Authentication
        4. 24.1.4. Profiles vs. Custom Data Components
      2. 24.2. Using the SqlProfileProvider
        1. 24.2.1. Creating the Profile Tables
        2. 24.2.2. Configuring the Provider
        3. 24.2.3. Defining Profile Properties
        4. 24.2.4. Using Profile Properties
        5. 24.2.5. Profile Serialization
        6. 24.2.6. Profile Groups
        7. 24.2.7. Profiles and Custom Data Types
          1. 24.2.7.1. Custom Type Serialization
          2. 24.2.7.2. Automatic Saves
        8. 24.2.8. The Profiles API
        9. 24.2.9. Anonymous Profiles
          1. 24.2.9.1. Migrating Anonymous Profiles
      3. 24.3. Custom Profile Providers
        1. 24.3.1. The Custom Profile Provider Classes
        2. 24.3.2. Designing the FactoredProfileProvider
        3. 24.3.3. Coding the FactoredProfileProvider
          1. 24.3.3.1. Initialization
          2. 24.3.3.2. Reading Profile Information
          3. 24.3.3.3. Updating Profile Information
        4. 24.3.4. Testing the FactoredProfileProvider
      4. 24.4. Summary
    7. 25. Cryptography
      1. 25.1. Encrypting Data: Confidentiality Matters
      2. 25.2. The .NET Cryptography Namespace
      3. 25.3. Understanding the .NET Cryptography Classes
        1. 25.3.1. Symmetric Encryption Algorithms
        2. 25.3.2. Asymmetric Encryption
        3. 25.3.3. The Abstract Encryption Classes
        4. 25.3.4. The ICryptoTransform Interface
        5. 25.3.5. The CryptoStream Class
      4. 25.4. Encrypting Sensitive Data
        1. 25.4.1. Managing Secrets
        2. 25.4.2. Using Symmetric Algorithms
          1. 25.4.2.1. Using the SymmetricEncryptionUtility Class
        3. 25.4.3. Using Asymmetric Algorithms
        4. 25.4.4. Encrypting Sensitive Data in a Database
      5. 25.5. Encrypting the Query String
        1. 25.5.1. Wrapping the Query String
        2. 25.5.2. Creating a Test Page
      6. 25.6. Summary
    8. 26. Custom Membership Providers
      1. 26.1. Architecture of Custom Providers
      2. 26.2. Basic Steps for Creating Custom Providers
        1. 26.2.1. Overall Design of the Custom Provider
        2. 26.2.2. Designing and Implementing the Custom Store
        3. 26.2.3. Implementing the Provider Classes
          1. 26.2.3.1. Creating Users and Adding Them to the Store
          2. 26.2.3.2. Validating Users on Login
          3. 26.2.3.3. Using Salted Password Hashes
          4. 26.2.3.4. The Remaining Functions of the Provider
          5. 26.2.3.5. Implementing the XmlRoleProvider
        4. 26.2.4. Using the Custom Provider Classes
          1. 26.2.4.1. Debugging Using the WAT
          2. 26.2.4.2. Using Custom Providers with IIS 7.x
      3. 26.3. Summary
  9. V. Advanced User Interface
    1. 27. Custom Server Controls
      1. 27.1. Custom Server Control Basics
        1. 27.1.1. Creating a Bare-Bones Custom Control
        2. 27.1.2. Using a Custom Control
        3. 27.1.3. Custom Controls in the Toolbox
        4. 27.1.4. Creating a Web Control That Supports Style Properties
        5. 27.1.5. The Rendering Process
      2. 27.2. Dealing with Different Browsers
        1. 27.2.1. The HtmlTextWriter
        2. 27.2.2. Browser Detection
        3. 27.2.3. Browser Properties
        4. 27.2.4. Overriding Browser Type Detection
        5. 27.2.5. Adaptive Rendering
      3. 27.3. Control State and Events
        1. 27.3.1. View State
        2. 27.3.2. Control State
        3. 27.3.3. Postback Data and Change Events
        4. 27.3.4. Triggering a Postback
      4. 27.4. Extending Existing Web Controls
        1. 27.4.1. Composite Controls
        2. 27.4.2. Derived Controls
          1. 27.4.2.1. Creating a Label for Specific Data
      5. 27.5. Summary
    2. 28. Graphics, GDI+, and Charting
      1. 28.1. The ImageMap Control
        1. 28.1.1. Creating Hotspots
        2. 28.1.2. Handling Hotspot Clicks
        3. 28.1.3. A Custom Hotspot
      2. 28.2. Drawing with GDI+
        1. 28.2.1. Simple Drawing
        2. 28.2.2. Image Format and Quality
        3. 28.2.3. The Graphics Class
        4. 28.2.4. Using a GraphicsPath
        5. 28.2.5. Pens
        6. 28.2.6. Brushes
      3. 28.3. Embedding Dynamic Graphics in a Web Page
        1. 28.3.1. Using the PNG Format
        2. 28.3.2. Passing Information to Dynamic Images
        3. 28.3.3. Custom Controls That Use GDI+
          1. 28.3.3.1. The Custom Control Class
          2. 28.3.3.2. The Rendering Page
      4. 28.4. Using the Chart Control
        1. 28.4.1. Creating a Basic Chart
        2. 28.4.2. Populating a Chart with Data
          1. 28.4.2.1. Binding to a Database Table
          2. 28.4.2.2. Binding to a Object DataSource
          3. 28.4.2.3. Binding to an XML File
          4. 28.4.2.4. Binding to LINQ
      5. 28.5. Summary
    3. 29. JavaScript and Ajax Techniques
      1. 29.1. JavaScript Essentials
        1. 29.1.1. The HTML Document Object Model
        2. 29.1.2. Client-Side Events
          1. 29.1.2.1. Adding JavaScript Attributes Declaratively
          2. 29.1.2.2. The OnClientClick Property
        3. 29.1.3. Script Blocks
        4. 29.1.4. Manipulating HTML Elements
        5. 29.1.5. Debugging JavaScript
      2. 29.2. Basic JavaScript Examples
        1. 29.2.1. Creating a JavaScript Page Processor
        2. 29.2.2. Using JavaScript to Download Images Asynchronously
        3. 29.2.3. Rendering Script Blocks
      3. 29.3. Script Injection Attacks
        1. 29.3.1. Request Validation
        2. 29.3.2. Disabling Request Validation
        3. 29.3.3. Extending Request Validation
      4. 29.4. Custom Controls with JavaScript
        1. 29.4.1. Pop-Up Windows
        2. 29.4.2. Rollover Buttons
      5. 29.5. Frames
        1. 29.5.1. Frame Navigation
        2. 29.5.2. Inline Frames
      6. 29.6. Understanding Ajax
        1. 29.6.1. The XMLHttpRequest Object
          1. 29.6.1.1. Sending a Request
          2. 29.6.1.2. Handling the Response
        2. 29.6.2. An Ajax Example
      7. 29.7. Using Ajax with Client Callbacks
        1. 29.7.1. Creating a Client Callback
          1. 29.7.1.1. Building the Basic Page
          2. 29.7.1.2. Implementing the Callback
          3. 29.7.1.3. Writing the Client-Side Script
          4. 29.7.1.4. Disabling Event Validation
        2. 29.7.2. Client Callbacks "Under the Hood"
        3. 29.7.3. Client Callbacks in Custom Controls
          1. 29.7.3.1. The DynamicPanel
          2. 29.7.3.2. The DynamicPanelRefreshLink
          3. 29.7.3.3. The Client Page
      8. 29.8. Summary
    4. 30. ASP.NET AJAX
      1. 30.1. Introducing ASP.NET AJAX
        1. 30.1.1. ASP.NET AJAX on the Client: The Script Libraries
        2. 30.1.2. ASP.NET AJAX on the Server: The ScriptManager
      2. 30.2. Server Callbacks
        1. 30.2.1. Web Services in ASP.NET AJAX
          1. 30.2.1.1. Creating the Web Service
          2. 30.2.1.2. Creating the Web Method
          3. 30.2.1.3. Calling the Web Service
        2. 30.2.2. Placing a Web Method in a Page
        3. 30.2.3. ASP.NET AJAX Application Services
          1. 30.2.3.1. Authentication Service
          2. 30.2.3.2. Role Service
          3. 30.2.3.3. Profile Service
      3. 30.3. ASP.NET AJAX Server Controls
        1. 30.3.1. Partial Rendering with the UpdatePanel
          1. 30.3.1.1. Handling Errors
          2. 30.3.1.2. Conditional Updates
          3. 30.3.1.3. Interrupted Updates
          4. 30.3.1.4. Triggers
          5. 30.3.1.5. Optimizing the UpdatePanel
        2. 30.3.2. Timed Refreshes with the Timer
        3. 30.3.3. Time-Consuming Updates with UpdateProgress
          1. 30.3.3.1. Cancellation
        4. 30.3.4. Managing Browser History
          1. 30.3.4.1. Adding History Points
          2. 30.3.4.2. Restoring Page State
          3. 30.3.4.3. How State Is Stored in the URL
      4. 30.4. Deeper into the Client Libraries
        1. 30.4.1. Understanding the Client Model
        2. 30.4.2. Object-Oriented Programming in JavaScript
          1. 30.4.2.1. Closures
          2. 30.4.2.2. Prototypes
          3. 30.4.2.3. Registering Classes with ASP.NET AJAX
          4. 30.4.2.4. Base Types
          5. 30.4.2.5. Namespaces
          6. 30.4.2.6. Inheritance
          7. 30.4.2.7. Interfaces
        3. 30.4.3. The Web-Page Framework
          1. 30.4.3.1. The Application Class
          2. 30.4.3.2. The PageRequestManager Class
          3. 30.4.3.3. A Client-Side AJAX Control
      5. 30.5. Control Extenders
        1. 30.5.1. Installing the ASP.NET AJAX Control Toolkit
        2. 30.5.2. The AutoCompleteExtender
        3. 30.5.3. The ASP.NET AJAX Control Toolkit
      6. 30.6. Summary
    5. 31. Portals with Web Part Pages
      1. 31.1. Typical Portal Pages
      2. 31.2. Basic Web Part Pages
        1. 31.2.1. Creating the Page Design
        2. 31.2.2. WebPartManager and WebPartZone Controls
        3. 31.2.3. Adding Web Parts to the Page
        4. 31.2.4. Customizing the Page
      3. 31.3. Creating Web Parts
        1. 31.3.1. Simple Web Part Tasks
          1. 31.3.1.1. Implementing the IWebPart Interface
        2. 31.3.2. Developing Advanced Web Parts
          1. 31.3.2.1. Before You Start: Creating Typed DataSets
          2. 31.3.2.2. The Custom WebPart's Skeleton
          3. 31.3.2.3. Initializing the Web Part
          4. 31.3.2.4. Loading Data and Processing Events
          5. 31.3.2.5. The Final Rendering
          6. 31.3.2.6. More Customization Steps
          7. 31.3.2.7. Using the Web Part
        3. 31.3.3. Web Part Editors
          1. 31.3.3.1. Creating a Custom Editor
        4. 31.3.4. Connecting Web Parts
          1. 31.3.4.1. Defining the Communication Contract
          2. 31.3.4.2. Implementing the Provider Web Part
          3. 31.3.4.3. Creating the Consumer Web Part
          4. 31.3.4.4. Static Connections Between Web Parts
          5. 31.3.4.5. Dynamically Configuring Connection Points
          6. 31.3.4.6. Multiple Connection Points
        5. 31.3.5. Custom Verbs and Web Parts
        6. 31.3.6. User Controls and Advanced Web Parts
        7. 31.3.7. Uploading Web Parts Dynamically
        8. 31.3.8. Authorizing Web Parts
        9. 31.3.9. Final Tasks for Personalization
          1. 31.3.9.1. Clearing Personalization
      4. 31.4. Summary
    6. 32. MVC
      1. 32.1. Choosing Between MVC and Web Forms
      2. 32.2. Creating a Basic MVC Application
        1. 32.2.1. Creating the Model
        2. 32.2.2. Creating the Controller
        3. 32.2.3. Creating the Index View
        4. 32.2.4. Testing the (Incomplete) Application
        5. 32.2.5. Completing the Controller and Views
        6. 32.2.6. Modifying the Site.Master File
      3. 32.3. Extending the Basic MVC Application
        1. 32.3.1. Configuring Routing
        2. 32.3.2. Adding Error Handling
        3. 32.3.3. Adding Authentication
        4. 32.3.4. Consolidating Data Store Access
        5. 32.3.5. Adding Support for Foreign Key Constraints
      4. 32.4. Customizing Views
        1. 32.4.1. Modifying the View
        2. 32.4.2. Adding View Data
      5. 32.5. Adding to the Model
      6. 32.6. Validating Data
        1. 32.6.1. Performing Basic Validation
        2. 32.6.2. Adding Validation Annotations
      7. 32.7. Using Action Results
        1. 32.7.1. Returning JSON Data
        2. 32.7.2. Calling Another Controller Method
      8. 32.8. Summary
    7. 33. Dynamic Data
      1. 33.1. Creating a Dynamic Data Application
        1. 33.1.1. Creating the Dynamic Data Site
        2. 33.1.2. Exploring the Dynamic Data Site
      2. 33.2. Understanding the Anatomy of a Dynamic Data Project
      3. 33.3. Customizing a Dynamic Data Site
        1. 33.3.1. Customizing with Templates
          1. 33.3.1.1. Editing the Default Templates
          2. 33.3.1.2. Creating a Custom Page Template
          3. 33.3.1.3. Using Entity Templates
          4. 33.3.1.4. Customizing Field Templates
        2. 33.3.2. Customizing with Routes
          1. 33.3.2.1. Understanding Routes
            1. 33.3.2.1.1. Changing the URL Format
            2. 33.3.2.1.2. Constraining a Route
          2. 33.3.2.2. Switching to Single-Page Editing
          3. 33.3.2.3. Using Different Templates for Tables
        3. 33.3.3. Customizing with Metadata
          1. 33.3.3.1. Creating a Metadata Class
          2. 33.3.3.2. Changing Display Names
          3. 33.3.3.3. Changing Visibility
          4. 33.3.3.4. Customizing Field Formatting
          5. 33.3.3.5. Using a Custom Field Template
        4. 33.3.4. Customizing Validation
          1. 33.3.4.1. Requiring a Field Value
          2. 33.3.4.2. Specifying a Valid Range
          3. 33.3.4.3. Customizing Validation Using Extensibility Methods
      4. 33.4. Summary
    8. 34. Silverlight
      1. 34.1. Understanding Silverlight
        1. 34.1.1. Silverlight vs. Flash
        2. 34.1.2. Silverlight System Requirements
      2. 34.2. Creating a Silverlight Solution
        1. 34.2.1. Silverlight Compilation
        2. 34.2.2. The Entry Page
      3. 34.3. Creating a Silverlight Project
        1. 34.3.1. Designing a Silverlight Page
        2. 34.3.2. Understanding XAML
        3. 34.3.3. Setting Properties
        4. 34.3.4. The XAML Code-Behind
        5. 34.3.5. Handling Events
        6. 34.3.6. Browsing the Silverlight Class Libraries
      4. 34.4. Layout
        1. 34.4.1. The Canvas
          1. 34.4.1.1. Layering Elements in a Canvas
          2. 34.4.1.2. Dragging Circles
        2. 34.4.2. The Grid
          1. 34.4.2.1. Fine-Tuning Rows and Columns
          2. 34.4.2.2. Nesting Layout Containers
          3. 34.4.2.3. Spanning Rows and Columns
      5. 34.5. Animation
        1. 34.5.1. Animation Basics
        2. 34.5.2. Defining an Animation
          1. 34.5.2.1. The Animation Class
        3. 34.5.3. The Storyboard Class
          1. 34.5.3.1. Configuring Animation Properties
        4. 34.5.4. An Interactive Animation Example
        5. 34.5.5. Transforms
          1. 34.5.5.1. Using a Transform
          2. 34.5.5.2. Animating a Transform
      6. 34.6. Using Web Services with Silverlight
        1. 34.6.1. Creating the Web Service
        2. 34.6.2. Adding a Web Reference
        3. 34.6.3. Calling the Web Service
        4. 34.6.4. Configuring the Web Service URL
        5. 34.6.5. Cross-Domain Web Service Calls
      7. 34.7. Summary