1. Trang chủ
  2. » Công Nghệ Thông Tin

989 beginning ASP NET 4 in c 2010

1K 281 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Prelim

  • Contents

  • About the Author

  • About the Technical Reviewer

  • Acknowledgments

  • Introduction

    • About This Book

      • Who Should Read This Book

      • What You Need to Use This Book

    • Code Samples

    • Chapter Overview

      • Part 1: Introducing .NET

      • Part 2: Developing ASP.NET Applications

      • Part 3: Building Better Web Forms

      • Part 4: Working with Data

      • Part 5: Website Security

      • Part 6: Advanced ASP.NET

    • Feedback

  • Introducing .NET

    • The .NET Framework

      • The Evolution of Web Development

        • HTML and HTML Forms

        • Server-Side Programming

        • Client-Side Programming

      • The .NET Framework

        • C#, VB, and the .NET Languages

        • Intermediate Language

        • The Common Language Runtime

        • The .NET Class Library

        • Visual Studio

      • The Last Word

    • The C# Language

      • The .NET Languages

      • C# Language Basics

        • Case Sensitivity

        • Commenting

        • Statement Termination

        • Blocks

      • Variables and Data Types

        • Assignment and Initializers

        • Strings and Escaped Characters

        • Arrays

        • The ArrayList

        • Enumerations

      • Variable Operations

        • Advanced Math

        • Type Conversions

      • Object-Based Manipulation

        • The String Type

        • The DateTime and TimeSpan Types

        • The Array Type

      • Conditional Logic

        • The if Statement

        • The switch Statement

      • Loops

        • The for Loop

        • The foreach Loop

        • The while loop

      • Methods

        • Parameters

        • Method Overloading

        • Optional and Named Parameters

        • Delegates

      • The Last Word

    • Types, Objects, and Namespaces

      • The Basics About Classes

        • Static Members

        • A Simple Class

      • Building a Basic Class

        • Creating an Object

        • Adding Properties

        • Automatic Properties

        • Adding a Method

        • Adding a Constructor

        • Adding an Event

        • Testing the Product Class

      • Value Types and Reference Types

        • Assignment Operations

        • Equality Testing

        • Passing Parameters by Reference and by Value

        • Reviewing .NET Types

      • Understanding Namespaces and Assemblies

        • Using Namespaces

        • Importing Namespaces

        • Assemblies

      • Advanced Class Programming

        • Inheritance

        • Static Members

        • Casting Objects

        • Partial Classes

        • Generics

      • The Last Word

  • Developing ASP.NET Applications

    • Visual Studio

      • The Promise of Visual Studio

      • Creating Websites

        • Creating an Empty Web Application

        • Websites and Web Projects

        • The Hidden Solution Files

        • The Solution Explorer

        • Adding Web Forms

        • Migrating a Website from a Previous Version of Visual Studio

      • Designing a Web Page

        • Adding Web Controls

        • The Properties Window

      • The Anatomy of a Web Form

        • The Web Form Markup

        • The Page Directive

        • The Doctype

        • The Essentials of XHTML

        • Elements

        • Attributes

        • Formatting

        • A Complete Web Page

      • Writing Code

        • The Code-Behind Class

        • Adding Event Handlers

        • Outlining

        • IntelliSense

        • Member List

        • Error Underlining

        • Automatically Importing Namespaces

        • Code Formatting and Coloring

      • Visual Studio Debugging

        • The Visual Studio Web Server

        • Single-Step Debugging

        • Variable Watches

      • The Last Word

    • Web Form Fundamentals

      • The Anatomy of an ASP.NET Application

        • ASP.NET File Types

        • ASP.NET Application Directories

      • Introducing Server Controls

        • HTML Server Controls

        • Converting an HTML Page to an ASP.NET Page

        • View State

        • The HTML Control Classes

        • Adding the Currency Converter Code

        • Event Handling

        • Behind the Scenes with the Currency Converter

        • Error Handling

      • Improving the Currency Converter

        • Adding Multiple Currencies

        • Dissecting the Code . . .

        • Storing Information in the List

        • Adding Linked Images

        • Setting Styles

      • A Deeper Look at HTML Control Classes

        • HTML Control Events

        • Advanced Events with the HtmlInputImage Control

        • The HtmlControl Base Class

        • The HtmlContainerControl Class

        • The HtmlInputControl Class

      • The Page Class

        • Sending the User to a New Page

        • HTML Encoding

      • Application Events

        • The global.asax File

        • Additional Application Events

      • ASP.NET Configuration

        • The web.config File

        • Nested Configuration

        • Storing Custom Settings in the web.config File

        • The Website Administration Tool (WAT)

      • The Last Word

    • Web Controls

      • Stepping Up to Web Controls

        • Basic Web Control Classes

        • The Web Control Tags

      • Web Control Classes

        • The WebControl Base Class

        • Units

        • Enumerations

        • Colors

        • Fonts

        • Focus

        • The Default Button

      • List Controls

        • Multiple-Select List Controls

        • The BulletedList Control

      • Table Controls

      • Web Control Events and AutoPostBack

        • How Postback Events Work

        • The Page Life Cycle

        • Dissecting the Code . . .

      • A Simple Web Page

        • Improving the Greeting Card Generator

        • Generating the Cards Automatically

      • The Last Word

    • Error Handling, Logging, and Tracing

      • Common Errors

      • Exception Handling

        • The Exception Class

        • The Exception Chain

      • Handling Exceptions

        • Catching Specific Exceptions

        • Nested Exception Handlers

        • Dissecting the Code . . .

        • Exception Handling in Action

        • Mastering Exceptions

      • Throwing Your Own Exceptions

      • Logging Exceptions

        • Viewing the Windows Event Logs

        • Writing to the Event Log

        • Custom Logs

        • A Custom Logging Class

        • Retrieving Log Information

      • Page Tracing

        • Enabling Tracing

        • Tracing Information

        • Request Details

        • Trace Information

        • Control Tree

        • Session State and Application State

        • Request Cookies and Response Cookies

        • Headers Collection

        • Form Collection

        • Query String Collection

        • Server Variables

        • Writing Trace Information

        • Application-Level Tracing

      • The Last Word

    • State Management

      • The Problem of State

      • View State

        • The ViewState Collection

        • A View State Example

        • Making View State Secure

        • Tamper-Proof View State

        • Private View State

        • Retaining Member Variables

        • Storing Custom Objects

      • Transferring Information Between Pages

        • Cross-Page Posting

        • Getting More Information from the Source Page

        • The Query String

        • A Query String Example

        • URL Encoding

      • Cookies

        • A Cookie Example

      • Session State

        • Session Tracking

        • Using Session State

        • A Session State Example

      • Session State Configuration

        • Cookieless

        • Timeout

        • Mode

        • InProc

        • Off

        • StateServer

        • SQLServer

        • Compression

      • Application State

      • An Overview of State Management Choices

      • The Last Word

  • Building Better Web Forms

    • Validation

      • Understanding Validation

        • The Validation Controls

        • Server-Side Validation

        • Client-Side Validation

      • The Validation Controls

        • A Simple Validation Example

        • Other Display Options

        • Manual Validation

        • Validating with Regular Expressions

        • Literals and Metacharacters

        • Finding a Regular Expression

        • A Validated Customer Form

        • Validation Groups

      • The Last Word

    • Rich Controls

      • The Calendar

        • Formatting the Calendar

        • Restricting Dates

      • The AdRotator

        • The Advertisement File

        • The AdRotator Class

      • Pages with Multiple Views

        • The MultiView Control

        • Creating Views

        • Showing a View

        • The Wizard Control

        • Wizard Steps

        • Wizard Events

        • Formatting the Wizard

        • Validation with the Wizard

      • The Last Word

    • User Controls and Graphics

      • User Controls

        • Creating a Simple User Control

        • Independent User Controls

        • Integrated User Controls

        • User Control Events

        • Passing Information with Events

      • Dynamic Graphics

        • Basic Drawing

        • Drawing a Custom Image

        • Placing Custom Images Inside Web Pages

        • Image Format and Quality

      • The Last Word

    • Styles, Themes, and Master Pages

      • Styles

        • Style Types

        • Creating a Basic Inline Style

        • The Style Builder

        • The CSS Properties Window

        • Style Inheritance

        • Creating a Style Sheet

        • The CSS Outline Window

        • Applying Style Sheet Rules

        • The Apply Styles Window

        • Creating More Styles

      • Themes

        • How Themes Work

        • Applying a Simple Theme

        • Handling Theme Conflicts

        • Creating Multiple Skins for the Same Control

        • More Advanced Skins

      • Master Page Basics

        • A Simple Master Page and Content Page

        • How Master Pages and Content Pages Are Connected

        • A Master Page with Multiple Content Regions

        • Default Content

        • Master Pages and Relative Paths

      • Advanced Master Pages

        • Style-Based Layouts

        • Code in a Master Page

        • Interacting with a Master Page Programmatically

      • The Last Word

    • Website Navigation

      • Site Maps

        • Defining a Site Map

        • Rule 1: Site Maps Begin with the <siteMap> Element

        • Rule 2: Each Page Is Represented by a <siteMapNode> Element

        • Rule 3: A <siteMapNode> Element Can Contain Other <siteMapNode> Elements

        • Rule 4: Every Site Map Begins with a Single <siteMapNode>

        • Rule 5: Duplicate URLs Are Not Allowed

        • Seeing a Simple Site Map in Action

        • Binding an Ordinary Page to a Site Map

        • Binding a Master Page to a Site Map

        • Binding Portions of a Site Map

        • Showing Subtrees

        • Using Different Site Maps in the Same File

        • The SiteMap Class

      • URL Mapping and Routing

        • URL Mapping

        • URL Routing

      • The SiteMapPath Control

        • Customizing the SiteMapPath

        • Using SiteMapPath Styles and Templates

        • Adding Custom Site Map Information

      • The TreeView Control

        • TreeView Properties

        • TreeView Styles

        • Applying Styles to Node Types

        • Applying Styles to Node Levels

      • The Menu Control

        • Menu Styles

        • Menu Templates

      • The Last Word

  • Working with Data

    • ADO.NET Fundamentals

      • Understanding Databases

      • Configuring Your Database

        • SQL Server Express

        • Browsing and Modifying Databases in Visual Studio

        • The sqlcmd Command-Line Tool

      • SQL Basics

        • Running Queries in Visual Studio

        • The Select Statement

        • A Sample Select Statement

        • Improving the Select Statement

        • An Alternative Select Statement

        • The Where Clause

        • String Matching with the Like Operator

        • Aggregate Queries

        • The SQL Update Statement

        • The SQL Insert Statement

        • The SQL Delete Statement

      • The Data Provider Model

      • Direct Data Access

        • Creating a Connection

        • The Connection String

        • Windows Authentication

        • User Instance Connections

        • Storing the Connection String

        • Making the Connection

        • The Select Command

        • The DataReader

        • Putting It All Together

        • Filling the List Box

        • Retrieving the Record

        • Updating Data

        • Displaying Values in Text Boxes

        • Adding a Record

        • Creating More Robust Commands

        • Updating a Record

        • Deleting a Record

      • Disconnected Data Access

        • Selecting Disconnected Data

        • Selecting Multiple Tables

        • Defining Relationships

      • The Last Word

    • Data Binding

      • Introducing Data Binding

        • Types of ASP.NET Data Binding

        • Single-Value, or “Simple,” Data Binding

        • Repeated-Value, or “List,” Binding

        • How Data Binding Works

      • Single-Value Data Binding

        • A Simple Data Binding Example

        • Simple Data Binding with Properties

        • Problems with Single-Value Data Binding

        • Using Code Instead of Simple Data Binding

      • Repeated-Value Data Binding

        • Data Binding with Simple List Controls

        • A Simple List Binding Example

        • Strongly Typed Collections

        • Multiple Binding

        • Data Binding with a Dictionary Collection

        • Using the DataValueField Property

        • Data Binding with ADO.NET

        • Creating a Record Editor

      • Data Source Controls

        • The Page Life Cycle with Data Binding

        • The SqlDataSource

        • Selecting Records

        • How the Data Source Controls Work

        • Parameterized Commands

        • Other Types of Parameters

        • Setting Parameter Values in Code

        • Handling Errors

        • Updating Records

        • Strict Concurrency Checking

      • The Last Word

    • The Data Controls

      • The GridView

        • Automatically Generating Columns

        • Defining Columns

        • Configuring Columns

        • Generating Columns with Visual Studio

      • Formatting the GridView

        • Formatting Fields

        • Using Styles

        • Configuring Styles with Visual Studio

        • Formatting-Specific Values

      • Selecting a GridView Row

        • Adding a Select Button

        • Using a Data Field As a Select Button

        • Using Selection to Create Master-Details Pages

      • Editing with the GridView

      • Sorting and Paging the GridView

        • Sorting

        • Sorting and Selecting

        • Paging

        • Paging and Selection

      • Using GridView Templates

        • Using Multiple Templates

        • Editing Templates in Visual Studio

        • Handling Events in a Template

        • Editing with a Template

        • Editing with Validation

        • Editing Without a Command Column

      • The DetailsView and FormView

        • The DetailsView

        • Defining Fields

        • The FormView

      • The Last Word

    • Files and Streams

      • Files and Web Applications

      • File System Information

        • The Path Class

        • The Directory and File Classes

        • Dissecting the Code . . .

        • The DirectoryInfo and FileInfo Classes

        • The DriveInfo Class

        • A Sample File Browser

        • Dissecting the Code . . .

      • Reading and Writing with Streams

        • Text Files

        • Binary Files

        • Shortcuts for Reading and Writing Files

        • A Simple Guest Book

        • Dissecting the Code . . .

      • Allowing File Uploads

        • The FileUpload Control

        • Dissecting the Code . . .

      • The Last Word

    • XML

      • XML Explained

        • Improving the List with XML

        • XML Basics

        • Attributes

        • Comments

      • The XML Classes

        • The XML TextWriter

        • Dissecting the Code . . .

        • The XML Text Reader

        • Dissecting the Code . . .

        • Working with XML Documents in Memory

        • Dissecting the Code . . .

        • Reading an XML Document

        • Searching an XML Document

      • XML Validation

        • XML Namespaces

        • Writing XML Content with Namespaces

        • XML Schema Definition

        • Dissecting the Code . . .

        • Validating an XML Document

      • XML Display and Transforms

        • The Xml Web Control

      • The Last Word

  • Website Security

    • Security Fundamentals

      • Understanding Security

        • Testing and Deploying Security Settings

      • Authentication and Authorization

      • Forms Authentication

        • Web.config Settings

        • Authorization Rules

        • Controlling Access to Specific Directories

        • Controlling Access to Specific Files

        • Controlling Access for Specific Users

        • The WAT

        • The Login Page

        • Retrieving the User’s Identity

        • Signing Out

        • Persistent Cookies

      • Windows Authentication

        • Web.config Settings

        • A Windows Authentication Test

      • The Last Word

    • Membership

      • The Membership Data Store

        • Membership with SQL Server Express

        • Using the Full Version of SQL Server

        • Configuring the Membership Provider

        • Creating Users with the WAT

        • The Membership and MembershipUser Classes

        • Authentication with Membership

        • Disabled Accounts

      • The Security Controls

        • The Login Control

        • The CreateUserWizard Control

        • The PasswordRecovery Control

      • Role-Based Security

        • Creating and Assigning Roles

        • Restricting Access Based on Roles

        • The LoginView Control

      • The Last Word

    • Profiles

      • Understanding Profiles

        • Profile Performance

        • How Profiles Store Data

      • Using the SqlProfileProvider

        • Enabling Authentication

        • Using SQL Server Express

        • Using the Full Version of SQL Server

        • The Profile Databases

        • Defining Profile Properties

        • Using Profile Properties

        • Profile Serialization

        • Profile Groups

        • Profiles and Custom Data Types

        • Dissecting the Code . . .

        • Custom Type Serialization

        • Automatic Saves

        • The Profile API

        • Anonymous Profiles

        • Migrating Anonymous Profiles

      • The Last Word

  • Advanced ASP.NET

    • Component-Based Programming

      • Why Use Components?

      • Component Jargon

        • Three-Tier Design

        • Encapsulation

        • Business Objects

        • Data Objects

        • Components and Classes

      • Creating a Component

        • Classes and Namespaces

        • Class Members

        • Adding a Reference to the Component

        • Using the Component

      • Properties and State

        • A Stateful Account Class

        • A Stateless AccountUtility Class

      • Data-Access Components

        • A Simple Data-Access Component

        • Dissecting the Code . . .

        • Using the Data-Access Component

        • Dissecting the Code . . .

        • Enhancing the Component with Error Handling

        • Enhancing the Component with Aggregate Information

      • The ObjectDataSource

        • Making Classes the ObjectDataSource Can Understand

        • Selecting Records

        • Using Method Parameters

        • Updating Records

      • The Last Word

    • Caching

      • Understanding Caching

        • When to Use Caching

        • Caching in ASP.NET

      • Output Caching

        • Caching on the Client Side

        • Caching and the Query String

        • Caching with Specific Query String Parameters

        • A Multiple Caching Example

        • Fragment Caching

        • Cache Profiles

      • Data Caching

        • Adding Items to the Cache

        • A Simple Cache Test

        • Caching to Provide Multiple Views

        • Caching with the Data Source Controls

        • Caching with SqlDataSource

        • Caching with ObjectDataSource

      • Caching with Dependencies

        • File Dependencies

        • Cache Item Dependencies

        • SQL Server Cache Dependencies

        • Enabling the Service Broker

        • Initializing the Caching Service

        • Creating the Cache Dependency

      • The Last Word

    • LINQ and the Entity Framework

      • Understanding LINQ

      • LINQ Basics

        • Dissecting the Code . . .

        • LINQ Expressions

        • Projections

        • Filtering and Sorting

      • The Entity Framework

        • Creating an Entity Data Model

        • The Data Model Diagram

        • Updating a Data Model

        • The Data Model Code

        • Entities

        • Contexts

        • Querying the Data Model

        • Handling Errors

        • Navigating Relationships

      • Getting More Advanced with the Entity Framework

        • Querying with LINQ to Entities

        • Controlling When Data is Loaded

        • Updates, Inserts, and Deletes

        • Managing Concurrency

      • The EntityDataSource

        • Displaying Data

        • Editing Data

      • The Last Word

    • ASP.NET AJAX

      • Understanding Ajax

        • Ajax: The Good

        • Ajax: The Bad

        • The ASP.NET AJAX Toolkit

        • The ScriptManager

      • Partial Refreshes

        • A Simple UpdatePanel Test

        • Handling Errors

        • Conditional Updates

        • Triggers

      • Progress Notification

        • Showing a Simulated Progress Bar

        • Cancellation

      • Timed Refreshes

      • The ASP.NET AJAX Control Toolkit

        • Installing the ASP.NET AJAX Control Toolkit

        • The Accordion

        • The AutoCompleteExtender

        • Getting More Controls

      • The Last Word

    • Deploying ASP.NET Applications

      • ASP.NET Applications and the Web Server

        • How Web Servers Work

        • The Virtual Directory

        • Web Application URLs

        • Web Farms

      • Internet Information Services (IIS)

        • The Many Faces of IIS

        • Installing IIS in Windows 7 or Windows Vista

        • Installing IIS 7 in Windows Server 2008

      • Managing Websites with IIS Manager

        • Creating a Virtual Directory

        • Understanding Application Pools

        • The ASP.NET Account

        • Changing the ASP.NET Account

        • Giving the ASP.NET Account More Privileges

        • Configuring a Website

        • The ASP.NET Configuration Icons

        • The IIS Configuration Icons

        • The Management Configuration Icons

        • The Default Page

        • Custom Error Pages

        • The Machine Key

        • Windows Authentication

        • Confidentiality with SSL and Certificates

        • Creating a Certificate Request

        • Implementing SSL

      • Deploying a Simple Site

        • Web Applications and Components

        • Other Configuration Steps

        • Code Compilation

      • Deploying with Visual Studio

        • Creating a Virtual Directory for a New Project

        • Copying a Website

        • Publishing a Website

      • The Last Word

  • Index

    • ¦ ¦ ¦ ¦ Special Characters and

    • Numbers

    • ¦ A

    • ¦ B

    • ¦ C

    • ¦ D

    • ¦ E

    • ¦ F

    • ¦ G

    • ¦ H

    • ¦ I

    • ¦ J

    • ¦ K

    • ¦ L

    • ¦ M

    • ¦ N

    • ¦ O

    • ¦ P

    • ¦ Q

    • ¦ R

    • ¦ S

    • ¦ T

    • ¦ U

    • ¦ V

    • ¦ W

    • ¦ X

    • ¦ Y

    • ¦ Z

Nội dung

Ngày đăng: 11/07/2018, 15:13

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN