Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
Part 1: Introducing .NET
Chapter 1: The Big Picture
The Evolution of Web Development
Basic HTML
HTML Forms
ASP.NET
Server-Side and Client-Side Programming
The .NET Framework
C#, VB, and the .NET Languages
The Common Language Runtime
The .NET Class Library
Visual Studio
The Last Word
Chapter 2: 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
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
Chapter 3: Types, Objects, and Namespaces
The Basics About Classes
Static Members
A Simple Class
Building a Basic Class
Creating an Object
Adding Properties
Using 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
Using Assemblies
Advanced Class Programming
Inheritance
Static Members
Casting Objects
Partial Classes
Generics
The Last Word
Part 2: Developing ASP.NET Applications
Chapter 4: Visual Studio
The Promise of Visual Studio
Creating Websites
Creating an Empty Web Application
The Difference Between Websites and Web Projects
Working with the Hidden Solution Files
Using the Solution Explorer
Adding Web Forms
Multitargeting
Opening a Website from a Previous Version of Visual Studio
Designing a Web Page
Adding Web Controls
Using the Properties Window
Exploring the Anatomy of a Web Form
The Web Form Markup
The Page Directive
The Doctype
The Essentials of HTML
Writing Code
Using the Code-Behind Class
Adding Event Handlers
Outlining
IntelliSense
Debugging
The IIS Express Web Server
Single-Step Debugging
Variable Watches
The Last Word
Chapter 5: Web Form Fundamentals
Understanding the Anatomy of an ASP.NET Application
ASP.NET File Types
ASP.NET Web Folders
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
Storing Information in the List
Adding Linked Images
Setting Styles
Taking 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
Using the Page Class
Sending the User to a New Page
Working with HTML Encoding
Using Application Events
The global.asax File
Additional Application Events
Configuring an ASP.NET Application
Working with the web.config File
Understanding Nested Configuration
Storing Custom Settings in the web.config File
Using the Website Administration Tool
The Last Word
Chapter 6: 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
An Interactive Web Page
Improving the Greeting Card Generator
Generating the Cards Automatically
The Last Word
Chapter 7: Error Handling, Logging, and Tracing
Avoiding Common Errors
Understanding Exception Handling
The Exception Class
The Exception Chain
Handling Exceptions
Catching Specific Exceptions
Using Nested Exception Handlers
Exception Handling in Action
Mastering Exceptions
Throwing Your Own Exceptions
Using Page Tracing
Enabling Tracing
Tracing Information
Writing Trace Information
Performing Application-Level Tracing
The Last Word
Chapter 8: State Management
Understanding the Problem of State
Using View State
The ViewState Collection
A View-State Example
Making View State Secure
Retaining Member Variables
Storing Custom Objects
Transferring Information Between Pages
Cross-Page Posting
The Query String
Using Cookies
A Cookie Example
Managing Session State
Session Tracking
Using Session State
A Session-State Example
Configuring Session State
Timeout
Cookieless
Mode
Using Application State
Comparing State Management Options
The Last Word
Part 3: Building Better Web Forms
Chapter 9: Validation
Understanding Validation
The Validation Controls
Server-Side Validation
Client-Side Validation
HTML5 Validation
Using the Validation Controls
A Simple Validation Example
Other Display Options
Manual Validation
Validation with Regular Expressions
A Validated Customer Form
Validation Groups
The Last Word
Chapter 10: Rich Controls
The Calendar
Formatting the Calendar
Restricting Dates
The AdRotator
The Advertisement File
The AdRotator Class
Pages with Multiple Views
The MultiView Control
The Wizard Control
The Last Word
Chapter 11: User Controls and Graphics
User Controls
Creating a Simple User Control
Working with Independent User Controls
Working with Integrated User Controls
Using User-Control Events
Passing Information with Events
Dynamic Graphics
Creating a Basic Drawing
Drawing a Custom Image
Placing Custom Images Inside Web Pages
Choosing Image Format and Quality
The Chart Control
Creating a Basic Chart
Using Other Ways to Get Chart Data
The Last Word
Chapter 12: Styles, Themes, and Master Pages
Styles
Style Types
Creating a Basic Inline Style
Creating a Style Sheet
Applying Style Sheet Rules
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
Chapter 13: Website Navigation
Site Maps
Defining a Site Map
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
Working with 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
The Menu Control
Menu Styles
Menu Templates
The Last Word
Part 4: Working with Data
Chapter 14: ADO.NET Fundamentals
Understanding Databases
Configuring Your Database
Using SQL Server Express
Browsing and Modifying Databases in Visual Studio
Using the sqlcmd Command-Line Tool
Understanding SQL Basics
Running Queries in Visual Studio
Using the Select Statement
Using the SQL Update Statement
Using the SQL Insert Statement
Using the SQL Delete Statement
Understanding the Data Provider Model
Using Direct Data Access
Creating a Connection
Using the Select Command
Using the DataReader
Putting It All Together
Updating Data
Using Disconnected Data Access
Selecting Disconnected Data
Selecting Multiple Tables
Defining Relationships
The Last Word
Chapter 15: Data Binding
Introducing Data Binding
Types of ASP.NET Data Binding
How Data Binding Works
Using Single-Value Data Binding
A Simple Data-Binding Example
Simple Data Binding with Properties
Problems with Single-Value Data Binding
Using Repeated-Value Data Binding
Data Binding with Simple List Controls
A Simple List-Binding Example
Multiple Binding
Data Binding with a Dictionary Collection
Using the DataValueField Property
Data Binding with ADO.NET
Creating a Record Editor
Working with Data Source Controls
The Page Life Cycle with Data Binding
The SqlDataSource
Selecting Records
Parameterized Commands
Handling Errors
Updating Records
The Last Word
Chapter 16: The Data Controls
The GridView
Automatically Generating Columns
Defining Columns
Formatting the GridView
Formatting Fields
Using Styles
Formatting-Specific Values
Selecting a GridView Row
Adding a Select Button
Using Selection to Create Master-Details Pages
Editing with the GridView
Sorting and Paging the GridView
Sorting
Paging
Using GridView Templates
Using Multiple Templates
Editing Templates in Visual Studio
Handling Events in a Template
Editing with a Template
The DetailsView and FormView
The DetailsView
The FormView
The Last Word
Chapter 17: Files and Streams
Files and Web Applications
File System Information
The Path Class
The Directory and File Classes
The DirectoryInfo and FileInfo Classes
The DriveInfo Class
A Sample File Browser
Reading and Writing with Streams
Text Files
Binary Files
Shortcuts for Reading and Writing Files
A Simple Guest Book
Allowing File Uploads
The FileUpload Control
The Last Word
Chapter 18: XML
XML Explained
Improving the List with XML
XML Basics
Attributes
Comments
The XML Classes
The XML TextWriter
The XML Text Reader
Working with XML Documents in Memory
Reading an XML Document
Searching an XML Document
XML Validation
XML Namespaces
XML Schema Definition
Validating an XML Document
XML Display and Transforms
The Xml Web Control
The Last Word
Part 5: Website Security
Chapter 19: Security Fundamentals
Understanding Security Requirements
Testing and Deploying Security Settings
Authentication and Authorization
Forms Authentication
Web.config Settings
Authorization Rules
The WAT
The Login Page
Windows Authentication
Web.config Settings
A Windows Authentication Test
The Last Word
Chapter 20: 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
Chapter 21: 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
The Profile API
Anonymous Profiles
The Last Word
Part 6: Advanced ASP.NET
Chapter 22: 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
Using the Data-Access Component
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
Chapter 23: Caching
Understanding Caching
When to Use Caching
Caching in ASP.NET
Output Caching
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 Dependencies
File Dependencies
Cache Item Dependencies
SQL Server Cache Dependencies
The Last Word
Chapter 24: LINQ and the Entity Framework
Understanding LINQ
LINQ Basics
Using the Entity Framework
Creating an Entity Data Model
Exploring the Data Model Diagram
Updating a Data Model
Reviewing the Data Model Code
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
Performing Updates, Inserts, and Deletes
Managing Concurrency
Using the EntityDataSource
Displaying Data
Editing Data
The Last Word
Chapter 25: ASP.NET AJAX
Understanding Ajax
Ajax: The Good
Ajax: The Bad
Ajax in ASP.NET
The ScriptManager
Using Partial Refreshes
A Simple UpdatePanel Test
Error Handling
Conditional Updates
Triggers
Using Progress Notification
Showing a Simulated Progress Bar
Enabling Cancellation
Implementing Timed Refreshes
Working with the ASP.NET AJAX Control Toolkit
Installing the ASP.NET AJAX Control Toolkit
Using the Accordion
Using the AutoCompleteExtender
Getting More Controls
The Last Word
Chapter 26: 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 on a Desktop Version of Windows
Installing IIS on Windows Server 2008
Installing IIS on Windows Server 2012
Managing Websites with IIS Manager
Creating a Virtual Directory
Understanding Application Pools
The ASP.NET Account
Configuring a Website
The Default Page
Custom Error Pages
The Machine Key
Windows Authentication
Confidentiality with SSL and Certificates
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
← Prev
Back
Next →
← Prev
Back
Next →