My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
ASP.NET Cookbook
The Ultimate ASP.NET Code Sourcebook
By
Michael A. Kittel
,
Geoffrey T. LeBlond
August 2004
Pages: 846
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Tabular Data
Introduction
Selecting the Right Tabular Control
Generating a Quick-and-Dirty Tabular Display
Enhancing the Output of a Tabular Display
Displaying Data from an XML File
Displaying an Array as a Group of Checkboxes
Displaying Data from a Hashtable
Adding Next/Previous Navigation to a DataGrid
Adding First/Last Navigation to a DataGrid
Adding Direct Page Navigation to a DataGrid
Paging Through a Record-Heavy DataGrid
Sorting Data Within a DataGrid
Sorting Data in Ascending/Descending Order Within a DataGrid
Combining Sorting and Paging in a DataGrid
Editing Data Within a DataGrid
Formatting Columnar Data in a DataGrid
Allowing Selection Anywhere Within a DataGrid Row
Adding a Delete Confirmation Pop Up
Displaying a Pop-Up Details Window
Adding a Totals Row to a DataGrid
Chapter 2
Validation
Introduction
Requiring that Data be Entered in a Field
Requiring Data to Be In a Range
Requiring that Two Data Input Fields Match
Requiring that Data Matches a Predefined Pattern
Requiring that a Drop-Down List Selection Be Made
Requiring Data to Match a Database Entry
Chapter 3
Forms
Introduction
Using the Enter Key to Submit a Form
Using the Enter Key to Submit a Form After Validation
Submitting a Form to a Different Page
Simulating Multipage Forms
Setting the Initial Focus to a Specific Control
Setting the Focus to a Control with a Validation Error
Chapter 4
User Controls
Introduction
Sharing a Page Header on Multiple Pages
Creating a Customizable Navigation Bar
Reusing Code-Behind Classes
Communicating Between User Controls
Adding User Controls Dynamically
Chapter 5
Custom Controls
Introduction
Combining HTML Controls in a Single Custom Control
Creating a Custom Control with Attributes
Creating a Custom Control with State
Customizing an ASP.NET TextBox Server Control
Chapter 6
Maintaining State
Introduction
Maintaining Information Needed by All Users of an Application
Maintaining Information about a User Throughout a Session
Preserving Information Between Postbacks
Preserving Information Across Multiple Requests for a Page
Chapter 7
Error Handling
Introduction
Handling Errors at the Method Level
Handling Errors at the Page Level
Handling Errors at the Application Level
Displaying User-Friendly Error Messages
Chapter 8
Security
Introduction
Restricting Access to All Application Pages
Restricting Access to Selected Application Pages
Restricting Access to Application Pages by Role
Using Windows Authentication
Chapter 9
Configuration
Introduction
Overriding Default HTTP Runtime Parameters in web.config
Adding Custom Application Settings in web.config
Displaying Custom Error Messages
Maintaining Session State Across Multiple Web Servers
Accessing Other web.config Configuration Elements
Adding Your Own Configuration Elements to web.config
Chapter 10
Tracing and Debugging
Introduction
Uncovering Page-Level Problems
Uncovering Problems Application Wide
Pinpointing the Cause of an Exception
Uncovering Problems Within Web Application Components
Uncovering Problems Within Dual-Use Components
Writing Trace Data to the Event Log with Controllable Levels
Using a Breakpoint to Stop Execution of an Application When a Condition Is Met
Stress Testing a Web Application or Service
Chapter 11
Web Services
Introduction
Creating a Web Service
Consuming a Web Service
Creating a Web Service That Returns a Custom Object
Setting the URL of a Web Service at Runtime
Chapter 12
Dynamic Images
Introduction
Drawing Button Images on the Fly
Creating Bar Charts on the Fly
Displaying Images Stored in a Database
Displaying Thumbnail Images
Chapter 13
Caching
Introduction
Caching Pages
Caching Pages Based on Query String Parameter Values
Caching Pages Based on Browser Type and Version
Caching Pages Based on Developer-Defined Custom Strings
Caching User Controls
Caching Application Data
Chapter 14
Internationalization
Introduction
Localizing Request/Response Encoding
Providing Multiple Language Support
Overriding Currency Formatting
Chapter 15
File Operations
Introduction
Downloading a File from the Web Server
Uploading a File to the Web Server
Processing an Uploaded File Without Storing It on the Filesystem
Storing the Contents of an Uploaded File in a Database
Chapter 16
Performance
Introduction
Reducing Page Size by Selectively Disabling the ViewState
Speeding up String Concatenation with a StringBuilder
Speeding Up Read-Only Data Access
Speeding Up Data Access to a SQL Server Database Using the SQL Provider
Chapter 17
HTTP Handlers
Introduction
Creating a Reusable Image Handler
Creating a File Download Handler
Chapter 18
Assorted Tips
Introduction
Accessing HTTP-Specific Information from Within a Class
Executing External Applications
Transforming XML to HTML
Determining the User's Browser Type
Dynamically Creating Browser-Specific Stylesheets
Saving and Reusing HTML Output
Sending Mail
Creating and Using Page Templates
Colophon
Return to
ASP.NET Cookbook