The Microsoft Expression Web Developer's Guide to ASP.NET 3.5: Learn to create ASP.NET applications using Visual Web Developer 2008
暫譯: 《Microsoft Expression Web 開發者指南:ASP.NET 3.5,使用 Visual Web Developer 2008 學習創建 ASP.NET 應用程式》

Jim Cheshire

  • 出版商: QUE
  • 出版日期: 2007-10-20
  • 售價: $1,880
  • 貴賓價: 9.5$1,786
  • 語言: 英文
  • 頁數: 504
  • 裝訂: Paperback
  • ISBN: 0789736659
  • ISBN-13: 9780789736659
  • 相關分類: .NETASP.NET
  • 已過版

買這商品的人也買了...

商品描述

Description

The Microsoft® Expression Web Developer’s Guide

to ASP.NET 3.5

 

Learn to create ASP.NET applications using Visual Web Developer 2008

 

Jim Cheshire

 

“This book is a great reference for web designers new to ASP.NET who are looking to jump start their development with

Visual Web Developer 2008.”

Mikhail Arkhipov

Principal Development Manager – Web Development Tools

Microsoft Corporation

 

Expression Web introduced ASP.NET to a new group of web developers. This book is designed to help you start using ASP.NET right away to add powerful new features to your website. Don’t worry, you won’t have to learn a lot of programming; instead, you’ll create an ASP.NET application from start to finish using Visual Web Developer 2008, while writing only a very small amount of actual programming code.

 

DETAILED INFORMATION ON HOW TO…

     •    Create and work with websites in Visual Web Developer 2008

     •    Use the different compilation and code models in ASP.NET

     •    Configure ASP.NET security and other settings

     •    Use ASP.NET master pages and user controls

     •    Take advantage of ASP.NET membership features for a password-protected website

     •    Use form validation in ASP.NET

     •    Use CSS, skins, and themes

     •    Access, edit, and add data to a database using ASP.NET

     •    Send email using ASP.NET

     •    Use Ajax and ASP.NET Web services

     •    Debug and troubleshoot ASP.NET

          . . . and much more!

 

Jim Cheshire is the author of several books, including Special Edition Using Microsoft Expression Web. He has been working with ASP.NET since before its release. He has been heavily involved in the web design community for more than a decade and is widely considered an expert in Microsoft’s web design technologies. Jim currently works as an escalation engineer on the ASP.NET team at Microsoft.

 

Table of Contents

Introduction

Part I Understanding ASP.NET Architecture

Chapter 1 Installing and Configuring ASP.NET

Understanding the .NET Framework and ASP.NET

Configuring ASP.NET

    Configuring ASP.NET on IIS 5.1 or IIS 6.0

    Configuring ASP.NET on IIS 7

    Using the ASP.NET Development Server

Troubleshooting IIS

Chapter 2 ASP.NET Code Models

Understanding ASP.NET Web Form Code

    ASP.NET Directives

    ASP.NET Design-Time Code

Server-Side Code Models

    Inline Server-Side Code

    Code-Behind Server-Side Code

Switching Server-Side Code Models

    Moving from Code-Behind to Inline Code

    Moving from Inline Code to Code-Behind

Choosing a Code Model

Chapter 3 ASP.NET Compilation Models

ASP.NET Compilation

    The Web Application Compilation Model

    The Website Compilation Model

    The Precompilation Model

Automating aspnet_compiler.exe in Visual Web Developer Express Edition

Chapter 4 ASP.NET Events and the Page Lifecycle

An Event-Driven Architecture

Application and Session Events

    Application Events and the Application Lifecycle

    Session Events

Page Events and the Page Lifecycle

    The Importance of the Lifecycle

Investigating the Page Lifecycle

Chapter 5 ASP.NET State Management

A Connectionless Environment

Understanding Application Variables

    Setting an Application Variable

    Retrieving an Application Variable

Understanding Session Variables

Using ASP.NET Caching

    Page Output Caching

    Fragment Caching

    The Cache API

    Retrieving Items from Cache

ASP.NET Viewstate and Control State

Chapter 6 ASP.NET Configuration and Performance

Overview of ASP.NET Configuration

ASP.NET Configuration Files

    Machine Configuration Files

    Application Configuration Files

The Web Site Administration Tool

    Security Tab

    Application Tab

    Provider Tab

ASP.NET Configuration in IIS

    IIS 5.1 and IIS 6

    IIS 7

Encrypting Information in the Configuration Files

Chapter 7 Basic ASP.NET Security

Authentication and Authorization

Configuring Windows Authentication

    Disabling Anonymous Browsing in IIS 5 and 6

    Disabling Anonymous Browsing in IIS 7 (Windows Vista)

Understanding Forms Authentication

Configuring Forms Authentication

    Configuring Forms Authentication with the ASP.NET Web Site Administration Tool

    Configuring Forms Authentication with the ASP.NET Configuration Settings Dialog (IIS 5 or 6 Only)

    Configuring Forms Authentication with the IIS Manager (IIS 7 Only)

Other Forms Authentication Settings

ASP.NET Authorization

    Configuring Authorization with the ASP.NET Configuration Settings Dialog (IIS 5 and 6 Only)

    Configuring Authorization with the IIS Manager (IIS 7 Only)

Why Not Windows Authentication?

Part II Creating ASP.NET Applications and Web Forms

Chapter 8 Creating Websites

The Structure of an ASP.NET Website

    Special Folders in an ASP.NET Application

Creating a Web Application in Visual Web Developer

    File System

    Local IIS

    FTP

    Remote Site

Start Options in Visual Web Developer

    Start Actions

    Server Options

Chapter 9 Creating ASP.NET Web Forms

Creating Web Forms in Visual Web Developer

    Creating ASP.NET Web Forms

    Other File Types Available in Visual Web Developer

Creating Web Pages in Expression Web

Choosing the Right Tool for ASP.NET Application Development

    Using the Code-Behind Model

    Using the Inline Code Model

A Suggested Workflow

    Use Either Tool to Create the Website

    Use Visual Web Developer to Create Pages

    Do Design Work in Either Tool

    Use Either Tool to Configure ASP.NET Controls

    Use Either Tool to Preview Your Pages

    Test ASP.NET Code in Visual Web Developer

    Publish Your Website with Expression Web

Part III Master Pages and User Controls

Chapter 10 Creating and Using Master Pages

An Introduction to Master Pages

Structure of Master Pages and Content Pages

Creating a Master Page

    Adding Content to the Master Page

    Formatting the Master Page

Configuring Navigation Controls

    Creating a Sitemap File

    Configuring the Menu to Use the Sitemap File

Connecting a Page to the Master Page

    Connecting a New Page

    Connecting an Existing Page

Checkpoint

Chapter 11 Creating and Using User Controls

What Are User Controls?

Creating a User Control

Adding User Controls to a Page

    Creating a User Control

    Editing a User Control

Converting a Page to a User Control

Checkpoint

Part IVASP.NET Membership

Chapter 12 Configuring a Membership Database

An Introduction to ASP.NET Membership

    The Membership Provider

Using the Default Membership Database

Using SQL Server 2000 or SQL Server 2005 for Membership

    Configuring the Database

    Configuring the Provider for the New Database

    Configuring the Connection String in IIS 5 or IIS 6

    Configuring the Connection String in IIS 7

    Configuring the Connection String in a Disk-based Application

Checkpoint

Chapter 13 Adding and Managing Users and Roles

Users and Roles

Configuring Authentication

Adding New Users

Enabling and Adding Roles

    Enabling Roles

    Creating Roles

    Adding a User to a Role

Configuring Access Rules

What Happens Under the Hood?

    Configuring Authentication

    Enabling Roles

    Creating Access Rules

Checkpoint

Chapter 14 Adding and Configuring Login and User Management Pages

Configuring the Login Control

    Configuring the Appearance of the Login Control

    Configuring the Behavior of the Login Control

Using the LoginView Control

Creating Accounts Using the CreateUserWizard Control

    Adding the Create User Page

    Adding a Confirmation Page

Resetting Lost Passwords

    Creating the Password Recovery Page

    Configuring ASP.NET for Sending Email

Changing Passwords

A Few Finishing Touches

    Adding a Link to Reset Password

    Adding a Change Password Link

    Fixing the Logo Graphic on the Master Page

Checkpoint

Part VASP.NET Forms and Validation

Chapter 15 Creating Forms Using ASP.NET

Introduction to ASP.NET Forms

Adding and Configuring ASP.NET Form Controls

    Required Elements for the Contact Us Page

    Adding Controls to the Contact Us Page

    Configuring the Topics DropDownList Control

Processing ASP.NET Forms

    The AutoPostBack Property

    The Button Control

    The IsPostBack Property

Displaying a Form Confirmation

    Placing the Form into a Panel

    Adding a Confirmation Message

    Adding Server-Side Code

Checkpoint

Chapter 16 Adding Form Field Validation Using ASP.NET

The Necessity of Form Validation

ASP.NET Validation Controls

    RequiredFieldValidator Control

    RangeValidator

    RegularExpressionValidator Control

    CompareValidator Control

    CustomValidator Control

    ValidationSummary Control

Common Validation Control Properties

    The Text Property

    The Display Property

    The ErrorMessage Property

    The ControlToValidate Property

    The EnableClientScript Property

    The SetFocusOnError Property

    The ValidationGroup Property

Adding and Configuring ASP.NET Validation Controls

Checkpoint

Part VIStyling Web Forms in Visual Web Developer 2008

Chapter 17 Creating and Managing CSS Styles

An Introduction to CSS

    Basic CSS Rules

    External Style Sheets

    Embedded Style Sheets

    Inline CSS Styles

Exploring CSS Classes and IDs

    CSS Classes

    CSS IDs

Using the Style Builder Dialog to Create Styles

    Creating a Simple Style

    Creating a New CSS Class

Using the Style Application Toolbar

    Using the Style Application Toolbar to Apply Formatting

    Applying Formatting to Existing Styles

Managing CSS Styles

    The Manage Styles Pane

    Using the Manage Styles Pane to Add New Styles

    Using the Manage Styles Pane to Modify Styles

Checkpoint

Chapter 18 Applying CSS to Web Forms

Using the Apply Styles Pane

    Applying a Style

    Removing a Previously Applied CSS Class, CSS ID, or Inline Style

Using the CSS Properties Pane

    Examining CSS Styles

    Applying CSS Styles

Checkpoint

Chapter 19 Using ASP.NET Themes and Skins

Introduction to ASP.NET Themes

    Makeup of a Theme

    Global Themes and Page Themes

    Skin Files

Creating a Theme

    Creating the Folder Structure

    Creating a Skin File

    Generating Formatting Code for Controls

    Transferring Formatting Code to the Skin File

Applying a Theme

Default Skins and Named Skins

Using a Theme with CSS Files

Checkpoint

Part VIIData Access with ASP.NET

Chapter 20 ASP.NET Data Controls

Accessing Data in ASP.NET 3.5

ASP.NET Data Source Controls

    SqlDataSource Control

    AccessDataSource Control

    LinqDataSource Control

    ObjectDataSource Control

    XmlDataSource Control

    SiteMapDataSource Control

Configuring a Data Source Control

Other ASP.NET Data Controls

    GridView Control

    DataList Control

    DetailsView Control

    FormView Control

    ListView Control

    Repeater Control

    DataPager Control

Checkpoint

Chapter 21 Displaying Data from a Database

Configuring the Data Source

    Adding an AccessDataSource Control

    Configuring the AccessDataSource Control

    Ordering Data

    Filtering Data

Using Data Controls to Display Data

    Adding a GridView Control

    Adding Paging and Sorting Features

Creating a Master/Detail View

    Configuring the GridView Control

    Adding a Data Source Control for the DetailsView

    Adding and Configuring the DetailsView Control

Checkpoint

Chapter 22 Adding, Editing, and Deleting Records

Creating the Editing Interface

    Adding and Configuring a GridView Control

    Adding and Configuring a New Data Source

    Adding and Configuring the FormView Control

Configuring the Functionality of the Editor

    Adding New Records

    Editing Records

    Deleting Records

Modifying Templates

    Modifying the InsertItemTemplate

    Modifying the EmptyDataTemplate

Checkpoint

Part VIIISending Email with ASP.NET

Chapter 23 Configuring ASP.NET for Email

How ASP.NET Sends Mail

    The System.Net.SmtpClient Class

    The System.Net.MailMessage Class

Modifying the Configuration File for Email

    Adding Email Configuration to the web.config File

    Using the Web Site Administration Tool

Checkpoint

Chapter 24 Sending Form Results to Email

Adding Server-Side Code to Send Email

    Reviewing the Contact Form

    Adding the Code

    Explaining the Code

Sending HTML Emails

Sending Emails with Attachments

Checkpoint

Part IXAjax and Web Services

Chapter 25 Creating and Testing an ASP.NET Web Service

An Explanation of ASP.NET Web Services

    The Structure of a Web Service

    The WSDL Document

Creating an ASP.NET Web Service

Invoking a Web Service Directly

Creating a Dataset for Use with a Web Service

    Creating the Dataset

    Connecting to the Database

    Adding a Parameter

     Using a Dataset with a Web Service

    Testing the Web Service

Using a Web Service in a Web Form

    Adding a Reference to the Web Service

    Adding a Data Source for the DropDownList Control

    Completing the Configuration of the Web Form

Checkpoint

Chapter 26 Adding Ajax Functionality

What Is Ajax?

Microsoft’s ASP.NET AJAX

    Microsoft AJAX Library

    Microsoft ASP.NET AJAX Extensions

    Microsoft AJAX ASP.NET Control Toolkit

Adding Ajax Functionality to a Web Form

    Targeting the .NET Framework 3.5

    Adding a ScriptManager Control

    Adding an UpdatePanel Control

Using the AJAX Library

    Adding Controls to the Web Form

    Creating the Client Library

    Adding the Client Script to the ScriptManagerProxy

Checkpoint

Part XDebugging and Troubleshooting ASP.NET

Chapter 27 Debugging ASP.NET Applications

The Basics of Debugging

Enabling and Configuring Debugging for an ASP.NET Application

    Enabling Debugging

    Configuring Debugging

Debugging Server-Side Code

    Setting a Breakpoint

Examining the State of an Application

    IntelliSense

    The Locals Window

    The Watch Window

    The Immediate Window

Debugging Client-Side Scripts

Using the Error List to Locate Application Errors

Checkpoint

Chapter 28 Handling Errors in an ASP.NET Application

Exceptions and the .NET Framework

    Exception-Handling Blocks

    Bubbling Exceptions

Implementing Structured Exception Handling

    Modifying the btnSend_Click Method

    Adding a Panel to Display Errors

Throwing Exceptions

Adding a Global Exception Handler

Using the <customErrors> Element

    <error> Elements

Checkpoint

Chapter 29 ASP.NET Tracing and Other Troubleshooting Techniques

ASP.NET Tracing

    Enabling Tracing

Analyzing Trace Output

    Request Details

    Trace Information

    Control Tree

    Session State

    Application State

    Request Cookies Collection

    Response Cookies Collection

    Headers Collection

    Response Headers Collection

    Form Collection

    Querystring Collection

    Server Variables

ASP.NET Health Monitoring

    Configuring the Application for Health Monitoring

    Viewing Health Monitoring Logs

Monitoring the Network with Fiddler

Checkpoint

Part XIDeploying ASP.NET Applications

Chapter 30 Publishing an ASP.NET Application

Using the Copy Web Site Tool

    Connecting to a Remote Site

    Copying Websites with the Copy Web Site Feature

Special Considerations for Membership Websites

    Obtaining the Application Name from the Database

    Editing the web.config File

Wrapping Up

Appendix Application Settings in Visual Web Developer

商品描述(中文翻譯)

**描述**

《Microsoft® Expression Web 開發者指南:ASP.NET 3.5》

學習如何使用 Visual Web Developer 2008 創建 ASP.NET 應用程式

Jim Cheshire

“這本書是針對新接觸 ASP.NET 的網頁設計師的絕佳參考,幫助他們快速啟動使用 Visual Web Developer 2008 的開發。”
— Mikhail Arkhipov
首席開發經理 – 網頁開發工具
微軟公司

Expression Web 將 ASP.NET 引入了一群新的網頁開發者。這本書旨在幫助您立即開始使用 ASP.NET,為您的網站添加強大的新功能。別擔心,您不需要學習大量的程式設計;相反,您將使用 Visual Web Developer 2008 從頭到尾創建一個 ASP.NET 應用程式,同時只需編寫非常少量的實際程式碼。

**詳細資訊包括…**

• 創建和使用 Visual Web Developer 2008 中的網站
• 使用 ASP.NET 中的不同編譯和程式碼模型
• 配置 ASP.NET 安全性和其他設置
• 使用 ASP.NET 主頁面和使用者控制項
• 利用 ASP.NET 會員功能來建立受密碼保護的網站
• 在 ASP.NET 中使用表單驗證
• 使用 CSS、樣式和主題
• 使用 ASP.NET 訪問、編輯和添加數據到資料庫
• 使用 ASP.NET 發送電子郵件
• 使用 Ajax 和 ASP.NET Web 服務
• 除錯和排除 ASP.NET 的故障
…以及更多!

Jim Cheshire 是多本書籍的作者,包括《Special Edition Using Microsoft Expression Web》。他自 ASP.NET 發布前就開始使用 ASP.NET,並在網頁設計社群中活躍了十多年,被廣泛認為是微軟網頁設計技術的專家。Jim 目前在微軟的 ASP.NET 團隊擔任升級工程師。

**目錄**

引言
**第一部分 理解 ASP.NET 架構**
**第 1 章** 安裝和配置 ASP.NET
理解 .NET Framework 和 ASP.NET
配置 ASP.NET
配置 IIS 5.1 或 IIS 6.0 上的 ASP.NET
配置 IIS 7 上的 ASP.NET
使用 ASP.NET 開發伺服器
故障排除 IIS
**第 2 章** ASP.NET 程式碼模型
理解 ASP.NET 網頁表單程式碼
ASP.NET 指令
ASP.NET 設計時程式碼
伺服器端程式碼模型
行內伺服器端程式碼
Code-Behind 伺服器端程式碼
切換伺服器端程式碼模型
從 Code-Behind 轉移到行內程式碼
從行內程式碼轉移到 Code-Behind
選擇程式碼模型
**第 3 章** ASP.NET 編譯模型
ASP.NET 編譯
網頁應用程式編譯模型
網站編譯模型
預編譯模型
在 Visual Web Developer Express Edition 中自動化 aspnet_compiler.exe
**第 4 章** ASP.NET 事件和頁面生命週期
事件驅動架構
應用程式和會話事件
應用程式事件和應用程式生命週期
會話事件
頁面事件和頁面生命週期
生命週期的重要性
調查頁面生命週期
**第 5 章** ASP.NET 狀態管理
無連接環境
理解應用程式變數
設定應用程式變數
檢索應用程式變數
理解會話變數
使用 ASP.NET 快取
頁面輸出快取
碎片快取
快取 API
從快取檢索項目
ASP.NET ViewState 和控制狀態
**第 6 章** ASP.NET 配置和性能
ASP.NET 配置概述
ASP.NET 配置檔
機器配置檔
應用程式配置檔
網站管理工具
安全性標籤
應用程式標籤
提供者標籤
IIS 中的 ASP.NET 配置
IIS 5.1 和 IIS 6
IIS 7
加密配置檔中的資訊
**第 7 章** 基本 ASP.NET 安全性
身份驗證和授權
配置 Windows 身份驗證
在 IIS 5 和 6 中禁用匿名瀏覽
在 IIS 7 (Windows Vista) 中禁用匿名瀏覽
理解表單身份驗證
配置表單身份驗證
使用 ASP.NET 網站管理工具配置表單身份驗證
使用 ASP.NET 配置設置對話框配置表單身份驗證 (僅限 IIS 5 或 6)
使用 IIS 管理員配置表單身份驗證 (僅限 IIS 7)
其他表單身份驗證設置
ASP.NET 授權
使用 ASP.NET 配置設置對話框配置授權 (僅限 IIS 5 和 6)
使用 IIS 管理員配置授權 (僅限 IIS 7)
為什麼不使用 Windows 身份驗證?
**第二部分 創建 ASP.NET 應用程式和網頁表單**
**第 8 章** 創建網站
ASP.NET 網站的結構
ASP.NET 應用程式中的特殊資料夾
在 Visual Web Developer 中創建網頁應用程式
檔案系統
本地 IIS
FTP
遠端網站
Visual Web Developer 中的啟動選項
啟動動作
伺服器選項
**第 9 章** 創建 ASP.NET 網頁表單
在 Visual Web Developer 中創建網頁表單
創建 ASP.NET 網頁表單
Visual Web Developer 中的其他檔案類型
在 Expression Web 中創建網頁
為 ASP.NET 應用程式開發選擇合適的工具
使用 Code-Behind 模型
使用行內程式碼模型
建議的工作流程
使用任一工具創建網站
使用 Visual Web Developer 創建頁面
在任一工具中進行設計工作
使用任一工具配置 ASP.NET 控制項
使用任一工具預覽您的頁面
在 Visual Web Developer 中測試 ASP.NET 程式碼
使用 Expression Web 發佈您的網站
**第三部分 主頁面和使用者控制項**
**第 10 章** 創建和使用主頁面
主頁面的介紹
主頁面和內容頁面的結構
創建主頁面
向主頁面添加內容