You are previewing Applied ASP.NET 4 in Context.
O'Reilly logo
Applied ASP.NET 4 in Context

Book Description

ASP.NET 4 is the latest version of Microsoft's revolutionary web technology. It is the principal technology for creating dynamic web pages on the Windows platform.

Applied ASP.NET 4 In Context sets the standard for clear, simple, hands-on advice for learning and deploying Microsoft's dynamic web solutions. Seasoned .NET author Adam Freeman explains how to get the most from ASP.NET by focusing on the features you need for your project. He starts with the nuts and bolts and shows you everything through to advanced features, going in-depth to give you the knowledge you need to use ASP.NET in a real-world context.

Effective and powerful ASP.NET programming is easier than ever before with this informed and practical guide.

What you'll learn

  • Understand the capabilities of ASP.NET 4 and why it is special

  • Learn how to build client applications using MVC, Web Forms and Silverlight

  • Build data-driven web applications using ADO.NET and LINQ

  • Rapidly prototype data applications using dynamic data

  • Enhance user interactions with JavaScript and jQuery

  • Create and consume web services using WCF

  • Customize web applications with advanced ASP.NET features

  • Deploy and secure your web applications on IIS 7

Each topic is covered clearly and concisely, each chapter packed with the details you need to be truly effective with ASP.NET 4. The most important features are given no-nonsense in-depth treatment, and chapters include common problems and details on how to avoid them.

Who this book is for

This book is for web developers who want to understand the context in which ASP.NET sits and the standards and best practices that can be employed to improve the efficiency and maintainability of their projects.

Table of Contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Part I: Getting Started
    1. Chapter 1: Introduction
      1. Who Should Read This Book?
      2. What Is Covered in This Book?
      3. What Is the Structure of This Book?
      4. What Do You Need to Read This Book?
      5. Getting the Example Code
      6. Finding More Information
      7. Summary
    2. Chapter 2: Getting Ready
      1. Installing Visual Studio 2010
      2. Installing the Essential Software
      3. Installing Optional Components
      4. Getting Ready for the MVC Framework
      5. Summary
    3. Chapter 3: Putting ASP.NET in Context
      1. An Overview of ASP.NET
      2. The Structure of ASP.NET
      3. Understanding Related Technologies
      4. Summary
  9. Part II: Getting to Know ASP .NET
    1. Chapter 4: Working with Pages
      1. Getting Started with Pages
      2. Adding a Web Page
      3. Making a Page Dynamic with Code Blocks
      4. Using a Code-Behind File
      5. Summary
    2. Chapter 5: Working with Context and Events
      1. Working with ASP.NET Events
      2. Working with Context
      3. Summary
    3. Chapter 6: Working with Forms and State
      1. Working with Forms
      2. Working with State
      3. Summary
    4. Chapter 7: Handling Errors
      1. Handling Errors
      2. Using ASP.NET Tracing
      3. Using the Visual Studio Debugger
      4. Summary
    5. Chapter 8: Working with Data
      1. Creating the Data Model
      2. Using the Data Model
      3. Consolidating the Data-Access Code
      4. Performing Other Data Operations
      5. Managing Concurrency
      6. Summary
    6. Chapter 9: Styling Content
      1. Creating the Project
      2. Using ASP.NET Master Pages
      3. Working with jQuery
      4. Summary
    7. Chapter 10: Adding Interactivity
      1. Creating the Project
      2. Improving Client Interactions with jQuery
      3. Using jQuery UI
      4. Summary
    8. Chapter 11: Working with Ajax
      1. Getting Started with Ajax
      2. Using Data Templates
      3. Using Ajax to Post an HTML Form
      4. Using Ajax to POST to a Web Service
      5. Summary
    9. Chapter 12: Working with Routes
      1. Preparing the Project
      2. Working with Routes
      3. Fixing the Master Page Tabs
      4. Routing URLs to Web Services
      5. Summary
  10. Part III: Using Web Forms
    1. Chapter 13: Putting Web Forms in Context
      1. Understanding Web Forms
      2. Understanding Web Forms Strengths
      3. Understanding Web Forms Weaknesses
      4. Deciding When to Use Web Forms
      5. Summary
    2. Chapter 14: Working with the Web Forms Designer
      1. Creating a Simple Web Forms Project
      2. Using the Design Surface
      3. Using CSS with Web Forms UI Controls
      4. Creating UI Control Event Handlers
      5. Summary
    3. Chapter 15: Working with Web Forms Controls
      1. Getting to Know the Basic Web Forms Controls
      2. Using the Navigation Controls
      3. Using Other Web Forms Controls
      4. Summary
    4. Chapter 16: Customizing Web Forms Controls
      1. Creating a User Control
      2. Using Control Templates
      3. Using Control Adapters
      4. Creating Custom Controls
      5. Summary
    5. Chapter 17: Validating Form Data
      1. Performing Manual Validation
      2. Performing Automatic Validation
      3. Styling and Positioning Validation Messages
      4. Using Server-Side Validation
      5. Creating a Custom Validation Function
      6. Summary
    6. Chapter 18: Using Web Forms Data Sources
      1. A Quick Example of Using Data Source Controls
      2. Working with Data Sources
      3. Using LINQ Queries As Data Sources
      4. Summary
    7. Chapter 19: Using Web Forms Data Binding
      1. Data Binding with Basic Web Forms Controls
      2. Using the Navigation Controls
      3. Creating Data-Bound Templates
      4. Using Paging
      5. Summary
    8. Chapter 20: Using the Rich Data Controls
      1. Putting the Rich Data Controls in Context
      2. Using the DetailsView Control
      3. Using the FormView Control
      4. Using the Repeater Control
      5. Using the ListView Control
      6. Using the DataList Control
      7. Using the GridView Control
      8. Creating Charts
      9. Summary
    9. Chapter 21: The Web Forms Triathlon App
      1. Creating the Project
      2. Building the Master Page
      3. Building the Events Page
      4. Building the Event Editor Page
      5. Building the Performance Page
      6. Building the Calculator Page
      7. Summary
  11. Part IV: Using the MVC Framework
    1. Chapter 22: Putting MVC in Context
      1. Understanding Model-View-Controller
      2. Understanding MVC Framework Strengths
      3. Understanding MVC Framework Weaknesses
      4. Deciding When to Use the MVC Framework
      5. Summary
    2. Chapter 23: A First MVC Application
      1. Creating the Project
      2. Creating the Domain Model
      3. Creating the Controller
      4. Creating the View
      5. Running the MVC Framework Application
      6. Finishing the Basic Features
      7. Enhancing the Application
      8. Summary
    3. Chapter 24: Implementing a Persistent Repository
      1. Creating the Database
      2. Creating the Repository
      3. Preparing the Model
      4. Modifying the Controller and the Views
      5. Summary
    4. Chapter 25: Working with Views
      1. Creating the Action Method
      2. Understanding the Location Search
      3. Creating the View
      4. Understanding Razor
      5. Defining a Code Block
      6. Creating an Inline HTML Helper
      7. Working with Layouts
      8. Using Partial Views
      9. Other View Features
      10. Summary
    5. Chapter 26: Using HTML Helpers and Templates
      1. Creating an External Helper Method
      2. Using the Built-in Helper Methods
      3. Using the Templated Helper Methods
      4. Summary
    6. Chapter 27: Using Routing and Areas
      1. Understanding Routing in the MVC Framework
      2. Generating Outgoing URLs
      3. Using Areas
      4. Summary
    7. Chapter 28: Working with Action Methods
      1. Preparing the Project
      2. Understanding Results from Action Methods
      3. Passing Data from the Action Method to the View
      4. Using Child Actions
      5. Using the HTTP Method Selector Attributes
      6. Dealing with Exceptions
      7. Summary
    8. Chapter 29: Working with Model Binding and Validation
      1. Understanding Model Binding
      2. Validating Models
      3. Using Client-Side Validation
      4. Summary
    9. Chapter 30: Using Unobtrusive Ajax
      1. Preparing the Project
      2. Enabling Unobtrusive Ajax
      3. Using Unobtrusive Ajax Forms
      4. Using Unobtrusive Ajax Links
      5. Working with JSON
      6. Performing Remote Validation
      7. Summary
    10. Chapter 31: The MVC Framework Triathlon App
      1. Creating the Project
      2. Creating the Model
      3. Creating and Implementing the Repository
      4. Setting Up Dependency Injection
      5. Configure the Routing
      6. Creating the Event Controller
      7. Building the Layout
      8. Building the Events Tab
      9. Building the Add Event Feature
      10. Building the Edit Feature
      11. Building the Delete Feature
      12. Building the Performance Tab
      13. Building the Calculator Tab
      14. Summary
  12. Part V: Wrapping Up
    1. Chapter 32: Preparing a Server for Deployment
      1. Enabling the Web Server Role
      2. Installing Additional Components
      3. Understanding the IIS Fundamentals
      4. Preparing the Server for the Application
      5. Summary
    2. Chapter 33: Deploying an ASP .NET Application
      1. Preparing for Deployment
      2. Deploying an Application
      3. Summary
    3. Chapter 34: Authentication and Authorization
      1. Setting Up Authentication
      2. Performing Authentication and Authorization
      3. Using Membership, Roles, and Profiles
      4. Summary
  13. Index