Programming ASP.NET, 3/e

Jesse Liberty, Dan Hurwitz

  • 出版商: O'Reilly
  • 出版日期: 2005-11-05
  • 售價: $1,720
  • 貴賓價: 9.5$1,634
  • 語言: 英文
  • 頁數: 960
  • 裝訂: Paperback
  • ISBN: 059600916X
  • ISBN-13: 9780596009168
  • 相關分類: .NETASP.NET
  • 已過版




O'Reilly has once again updated its bestselling tutorial on ASP.NET, the world's leading web development tool from Microsoft. In Programming ASP.NET, Third Edition, author Jesse Liberty gives you the lowdown on the technology's latest version, ASP.NET 2.0, as well as Visual Studio 2005.

One of the most significant improvements to ASP.NET 2.0 is its intuitive nature. In fact, when compared to its predecessor, ASP.NET 2.0 reduces the amount of code you have to write by about 75%. Creating interactive web applications has never been easier-but that still doesn't mean it's hassle-free! The difficulty in ASP.NET 2.0 is that it's so complete and flexible that there are many pieces that must be woven together to build a robust, scalable, and efficient application.

Fortunately, Programming ASP.NET, Third Edition is on the case, dispensing all the information you need to be effective with this dynamic tool. For starters, the book features a comprehensive tutorial on Web Forms, the user interface that gives web applications their look and feel. It then offers detailed explanations of all new controls, including Web server controls, HTML controls, and custom controls. Used properly, these controls are able to take care of nearly all the foundation work-security, data access, layout, etc.-that you would normally have to write yourself. Free of these burdensome tasks, you can instead focus on your specific application.

Other new material found in this updated edition even shows you how to create ASP.NET 2.0 pages for mobile devices. With Programming ASP.NET, Third Edition at your side, there's virtually no end to the programming possibilities.

Table of Contents:


1. ASP.NET 2.0

     .NET Framework 2.0

     ASP.NET 2.0

     New Features

               Special Folders Make Integration Easier



               Master Pages


               Web Sites Without IIS

               Improved Controls

               New Controls

               Visual Studio 2005 (VS2005)

               Mobile Devices

     On to VS2005

2. Visual Studio 2005

     Start Page

               File System



               Creating Your First Web Page

     Projects and Solutions


               Projects and Files


               Project Names

     The Integrated Development Environment (IDE)


               Building and Running

               Menus and Toolbars

               File Menu

               Edit Menu

               View Menu

               Refactor Menu

               Website Menu

               Project Menu

               Build Menu

               Debug Menu

               Data Menu

               Format Menu

               Tools Menu

               Window Menu

               Help Menu

3. Controls: Fundamental Concepts


               ASP.NET Events

               Event Arguments

               Application and Session Events

               Page and Control Events

               Postback Versus Non-Postback Events


               Events in Visual Studio 2005

               Multiple Controls to One Event Handler

     ASP.NET Server Controls

               ASP.NET and Browsers

               ASP.NET Server Control Class Hierarchy

               CSS Styles

     HTML Server Controls

     Client-Side Processing

4. Basic Controls

     The Basics

     Label Control

     TextBox Control

     HiddenField Control

     Button Controls

     HyperLink Control

     Selecting Values

               CheckBox Control

               RadioButton Control

     Selecting from a List

               ListItem Object

               CheckBoxList Control

               RadioButtonList Control

               DropDownList Control

               ListBox Control

               BulletedList Control


               Table Rows

               Table Cells

               Cell Width

     Panel Control


               Image Control

               ImageMap Control

5. Advanced Controls

     MultiView and View Controls

     Wizard Control

     FileUpload Control

     AdRotator Control

               Advertisement File

               Using AdRotator


               Selecting Dates in the Calendar

               Controlling the Calendar's Appearance

               Programming the Calendar Control

6. Web Site Fundamentals

     The Page


     Moving to Another Page




               Cross-Page Posting


               Session State

               View State

               State Bag

               Application State



               Application Directive

               Assembly Directive

               Control Directive

               Implements Directive

               Import Directive

               Master Directive

               MasterType Directive

               OutputCache Directive

               Page Directive

               Reference Directive

               Register Directive

7. Tracing, Debugging, and Error Handling

     Creating the Sample Application


               Page-Level Tracing

               Inserting into the Trace Log

               Application-Level Tracing

               Trace Viewer


               The Debug Toolbar


               Stepping Through Code

               Examining Variables and Objects

               Debug Windows

     Error Handling

               Unhandled Errors

               Application-Wide Error Pages

               Page-Specific Error Pages

8. Validation

     The RequiredFieldValidator

     The Summary Control

     The Compare Validator

               Checking the Input Type

               Comparing to Another Control

     Range Checking

     Regular Expressions

     Custom Validation

     Validation Groups

9. Web Data Access

     Getting Data from a Database

     Data Source Controls

     GridView Control

               Adding Insert, Update, and Delete Statements

     Multiuser Updates

               Optimistic Concurrency

               Displaying and Updating the Grid

               Take It for a Spin

               Tracking the Update with Events

               Modifying the Grid Based on Events

               Passing Parameters to the Select Query

     DataList Control

               Editing Items in List Controls

               Deleting Items from a List Control

     Repeater Control

     DetailsView Control: Examining One Record at a Time

     FormView Control: Examining Single Records as Master/Detail

               Editing with FormView

               Inserting New Records

               DetailsView and FormView Events


     The ADO.NET Object Model

               The DataSet Class

               DbCommand and DbConnection

               The DataAdapter Object

               The Data Reader Object

     Getting Started with ADO.NET

               Using a DataReader

               Creating Data Relations Within DataSets

     Creating Data Objects by Hand

               Bug Database Design

               Creating the DataTable by Hand

               Creating Primary Keys

               Creating Foreign Keys

               Creating Data Relations

     Stored Procedures

               Creating a Simple Stored Procedure

               Stored Procedures with Parameters

     Updating with SQL and ADO.NET

     Updating Data with Transactions

               The ACID Test

               Implementing Transactions

     Binding to Business Objects

11. Forms-Based Security


               Anonymous Access

               Windows Authentication

               Passport Authentication

               Forms Authentication

     Forms-Based Authentication in Detail

               Create the Application

               Adding a Password Reminder

     Add Roles to ASP.NET Accounts

               Using the Web Administrator Tool to Set Up Roles

               Restricting Access to Pages Based on Roles

12. Master Pages and Navigation

     Master Pages

               Adding Content Pages

               Using Nested Master Pages

               Dynamically Editing the Master


               Getting Started with Site Navigation

               Setting Up the Pages

               Customizing the Look and Feel

               Populating on Demand

               Using a Menu for Navigation

               Enumerate Site Map Nodes Programatically

     Filtering Based on Security

               Enable Membership

               Adding Roles

               Add a Login Page

               Create Access Rules

               Creating a Permission-Driven Site Map

13. Personalization

     Creating Personalized Web Sites

               Recording Personalization Information

               Setting Up Profile Handling

               Exploring the Profile Tables

     Personalizing with Complex Types

     Anonymous Personalization

     Themes and Skins

               Create the Test Site

               Organize Site Themes and Skins

               Enable Themes and Skins

               Specify Themes for Your Page

               Setting Stylesheet Themes

               Setting Customization Themes

               Using Named Skins

     Web Parts

               Web Parts Architecture

               Creating Zones

               Adding Controls to Zones

               Minimizing and Restoring

     Enabling Editing and Layout Changes

               Creating a User Control to Enable Changing Page Layout

               Adding Parts from a Catalog

14. Custom and User Controls

     User Controls

               User Controls with Code

               @Control Directive


               Handling Events

     Custom Controls


               The Render Method

               Updating the Control

               Maintaining State

               Creating Derived Controls

               Creating Composite Controls

15. Creating Web Services

     How Web Services Work

               Developing a Web Service

               The Proxy

               Creating the Consumer

     Protocols and Standards




               Web Services Enhancements (WSE)

     Creating a Simple Web Service

               In-Line with a Text Editor

               Code-Behind with Visual Studio 2005

     WebService Directive

     Deriving from the WebService Class

     Application State via HttpContext

     WebServiceBinding Attribute

     WebMethod Attribute

               The BufferResponse Property

               CacheDuration Property

               Description Property

               EnableSession Property

               MessageName Property

               TransactionOption Property

     WebService Attribute

               Description Property

               Name Property

               Namespace Property

     Data Types


               Classes and Structs



     Creating Discovery Documents

               Discovery via Query String

               Static Discovery Files


               Pre-Compiled Assemblies

               Dynamically Compiled Assemblies

16. Consuming Web Services


     Creating the Client with VS2005

     Creating the Client Manually

               Creating the Consumer Web Page Content

               Creating the Proxy

               Compiling the Proxy Class

               Finishing the Consumer App

     Using Asynchronous Method Calls

17. Caching and Performance

     Types of Caching

               Class Caching

               Configuration Caching

               Data Caching

               Output Caching

               Object Caching

     Data Caching

               DataSourceControl Caching

               SQL Cache Dependency

     Output Caching

               The OutputCache Directive

               Fragment Caching: Caching Part of a Page

     Object Caching

               Cache Class Functionality



               Callback Support

     The HttpCachePolicy Class


               ASP.NET-Specific Issues

               General .NET Issues

               Database Issues

     Benchmarking and Profiling

18. Application Logic and Configuration

     Internet Information Server (IIS)

               IIS Versions

               Virtual Directories

     Understanding Web Applications

     Application-Wide Logic

               HttpApplication Object


               Global Members

     Configuring the Application

               Hierarchical Configuration


               Configuration Settings UI

               Web Site Administration Tool

               Other Configuration Settings

               Custom Configuration Sections

19. Deployment


               Microsoft Intermediate Language (MSIL)




               Private Versus Shared Assemblies

               Strong Names

     Local Deployment

               Full Runtime Compilation

               Manual Compilation of Assemblies

               Full Pre-Compilation

               Pre-Compilation of Code Only

     Global Deployment

     Windows Installer

               Build Configurations

               Adding a Setup Project with the Setup Wizard

               Adding a Setup Project Manually

               Further Customizations

               Deploying the Web Site

A. Keyboard Shortcuts

B. Relational Database Technology: A Crash Course