Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Geoffrey T. LeBlond, Michael A Kittel
ASP.NET Cookbook
ASP.NET Cookbook
Preface
What This Book Is About
Who This Book Is For
How This Book Is Organized
Topics Not Covered
Sample Source Code
Sample Database, Scripts, and Connection Strings
Do I Need Visual Studio .NET?
Web Resources
Web Sites
Newsgroups
Conventions Used in This Book
Using Code Examples
Comments and Questions
Acknowledgments
1. Tabular Data
Introduction
1.1. Selecting the Right Tabular Control
Problem
Solution
Discussion
1.2. Generating a Quick-and-Dirty Tabular Display
Problem
Solution
Discussion
See Also
1.3. Enhancing the Output of a Tabular Display
Problem
Solution
Discussion
See Also
1.4. Displaying Data from an XML File
Problem
Solution
Discussion
1.5. Displaying an Array as a Group of Checkboxes
Problem
Solution
Discussion
1.6. Displaying Data from a Hashtable
Problem
Solution
Discussion
1.7. Adding Next/Previous Navigation to a DataGrid
Problem
Solution
Discussion
See Also
1.8. Adding First/Last Navigation to a DataGrid
Problem
Solution
Discussion
See Also
1.9. Adding Direct Page Navigation to a DataGrid
Problem
Solution
Discussion
See Also
1.10. Paging Through a Record-Heavy DataGrid
Problem
Solution
Discussion
1.11. Sorting Data Within a DataGrid
Problem
Solution
Discussion
1.12. Sorting Data in Ascending/Descending Order Within a DataGrid
Problem
Solution
Discussion
See Also
1.13. Combining Sorting and Paging in a DataGrid
Problem
Solution
Discussion
See Also
1.14. Editing Data Within a DataGrid
Problem
Solution
Discussion
1.15. Formatting Columnar Data in a DataGrid
Problem
Solution
Discussion
1.16. Allowing Selection Anywhere Within a DataGrid Row
Problem
Solution
Discussion
1.17. Adding a Delete Confirmation Pop Up
Problem
Solution
Discussion
See Also
1.18. Displaying a Pop-Up Details Window
Problem
Solution
Discussion
1.19. Adding a Totals Row to a DataGrid
Problem
Solution
Discussion
2. Validation
Introduction
2.1. Requiring that Data be Entered in a Field
Problem
Solution
Discussion
See Also
2.2. Requiring Data to Be In a Range
Problem
Solution
Discussion
See Also
2.3. Requiring that Two Data Input Fields Match
Problem
Solution
Discussion
See Also
2.4. Requiring that Data Matches a Predefined Pattern
Problem
Solution
Discussion
See Also
2.5. Requiring that a Drop-Down List Selection Be Made
Problem
Solution
Discussion
See Also
2.6. Requiring Data to Match a Database Entry
Problem
Solution
Discussion
See Also
3. Forms
Introduction
3.1. Using the Enter Key to Submit a Form
Problem
Solution
Discussion
See Also
3.2. Using the Enter Key to Submit a Form After Validation
Problem
Solution
Discussion
See Also
3.3. Submitting a Form to a Different Page
Problem
Solution
Discussion
3.4. Simulating Multipage Forms
Problem
Solution
Discussion
See also
3.5. Setting the Initial Focus to a Specific Control
Problem
Solution
Discussion
See Also
3.6. Setting the Focus to a Control with a Validation Error
Problem
Solution
Discussion
4. User Controls
Introduction
4.1. Sharing a Page Header on Multiple Pages
Problem
Solution
Discussion
4.2. Creating a Customizable Navigation Bar
Problem
Solution
Discussion
See Also
4.3. Reusing Code-Behind Classes
Problem
Solution
Discussion
See Also
4.4. Communicating Between User Controls
Problem
Solution
Discussion
See Also
4.5. Adding User Controls Dynamically
Problem
Solution
Discussion
5. Custom Controls
Introduction
5.1. Combining HTML Controls in a Single Custom Control
Problem
Solution
Discussion
See Also
5.2. Creating a Custom Control with Attributes
Problem
Solution
Discussion
See Also
5.3. Creating a Custom Control with State
Problem
Solution
Discussion
See Also
5.4. Customizing an ASP.NET TextBox Server Control
Problem
Solution
Discussion
See Also
6. Maintaining State
Introduction
6.1. Maintaining Information Needed by All Users of an Application
Problem
Solution
Discussion
6.2. Maintaining Information about a User Throughout a Session
Problem
Solution
Discussion
See Also
6.3. Preserving Information Between Postbacks
Problem
Solution
Discussion
See Also
6.4. Preserving Information Across Multiple Requests for a Page
Problem
Solution
Discussion
See Also
7. Error Handling
Introduction
7.1. Handling Errors at the Method Level
Problem
Solution
Discussion
Basic syntax of Try...Catch...Finally
Guidelines for implementing
Additional considerations
See Also
7.2. Handling Errors at the Page Level
Problem
Solution
Discussion
See Also
7.3. Handling Errors at the Application Level
Problem
Solution
Discussion
See Also
7.4. Displaying User-Friendly Error Messages
Problem
Solution
Discussion
See Also
8. Security
Introduction
8.1. Restricting Access to All Application Pages
Problem
Solution
Discussion
See Also
8.2. Restricting Access to Selected Application Pages
Problem
Solution
Discussion
See Also
8.3. Restricting Access to Application Pages by Role
Problem
Solution
Discussion
See Also
8.4. Using Windows Authentication
Problem
Solution
Discussion
See Also
9. Configuration
Introduction
Configuration File Hierarchy
Structure and Use of web.config
Modifying web.config
9.1. Overriding Default HTTP Runtime Parameters in web.config
Problem
Solution
Discussion
See Also
9.2. Adding Custom Application Settings in web.config
Problem
Solution
Discussion
See Also
9.3. Displaying Custom Error Messages
Problem
Solution
Discussion
9.4. Maintaining Session State Across Multiple Web Servers
Problem
Solution
Discussion
9.5. Accessing Other web.config Configuration Elements
Problem
Solution
Discussion
9.6. Adding Your Own Configuration Elements to web.config
Problem
Solution
Discussion
10. Tracing and Debugging
Introduction
10.1. Uncovering Page-Level Problems
Problem
Solution
Discussion
See Also
10.2. Uncovering Problems Application Wide
Problem
Solution
Discussion
10.3. Pinpointing the Cause of an Exception
Problem
Solution
Discussion
10.4. Uncovering Problems Within Web Application Components
Problem
Solution
Discussion
See Also
10.5. Uncovering Problems Within Dual-Use Components
Problem
Solution
Discussion
See Also
10.6. Writing Trace Data to the Event Log with Controllable Levels
Problem
Solution
Discussion
See Also
10.7. Using a Breakpoint to Stop Execution of an Application When a Condition Is Met
Problem
Solution
Discussion
See Also
10.8. Stress Testing a Web Application or Service
Problem
Solution
Discussion
11. Web Services
Introduction
11.1. Creating a Web Service
Problem
Solution
Discussion
11.2. Consuming a Web Service
Problem
Solution
Discussion
See Also
11.3. Creating a Web Service That Returns a Custom Object
Problem
Solution
Discussion
See Also
11.4. Setting the URL of a Web Service at Runtime
Problem
Solution
Discussion
12. Dynamic Images
Introduction
12.1. Drawing Button Images on the Fly
Problem
Solution
Discussion
See Also
12.2. Creating Bar Charts on the Fly
Problem
Solution
Discussion
See Also
12.3. Displaying Images Stored in a Database
Problem
Solution
Discussion
See Also
12.4. Displaying Thumbnail Images
Problem
Solution
Discussion
See Also
13. Caching
Introduction
13.1. Caching Pages
Problem
Solution
Discussion
See Also
13.2. Caching Pages Based on Query String Parameter Values
Problem
Solution
Discussion
13.3. Caching Pages Based on Browser Type and Version
Problem
Solution
Discussion
See also
13.4. Caching Pages Based on Developer-Defined Custom Strings
Problem
Solution
Discussion
See Also
13.5. Caching User Controls
Problem
Solution
Discussion
See Also
13.6. Caching Application Data
Problem
Solution
Discussion
See Also
14. Internationalization
Introduction
14.1. Localizing Request/Response Encoding
Problem
Solution
Discussion
14.2. Providing Multiple Language Support
Problem
Solution
Discussion
See Also
14.3. Overriding Currency Formatting
Problem
Solution
Discussion
15. File Operations
Introduction
15.1. Downloading a File from the Web Server
Problem
Solution
Discussion
See Also
15.2. Uploading a File to the Web Server
Problem
Solution
Discussion
See Also
15.3. Processing an Uploaded File Without Storing It on the Filesystem
Problem
Solution
Discussion
See Also
15.4. Storing the Contents of an Uploaded File in a Database
Problem
Solution
Discussion
See Also
16. Performance
Introduction
16.1. Reducing Page Size by Selectively Disabling the ViewState
Problem
Solution
Discussion
See Also
16.2. Speeding up String Concatenation with a StringBuilder
Problem
Solution
Discussion
See Also
16.3. Speeding Up Read-Only Data Access
Problem
Solution
Discussion
See Also
16.4. Speeding Up Data Access to a SQL Server Database Using the SQL Provider
Problem
Solution
Discussion
See Also
17. HTTP Handlers
Introduction
17.1. Creating a Reusable Image Handler
Problem
Solution
Discussion
17.2. Creating a File Download Handler
Problem
Solution
Discussion
See Also
18. Assorted Tips
Introduction
18.1. Accessing HTTP-Specific Information from Within a Class
Problem
Solution
Discussion
See Also
18.2. Executing External Applications
Problem
Solution
Discussion
18.3. Transforming XML to HTML
Problem
Solution
Discussion
See Also
18.4. Determining the User’s Browser Type
Problem
Solution
Discussion
See Also
18.5. Dynamically Creating Browser-Specific Stylesheets
Problem
Solution
Discussion
See Also
18.6. Saving and Reusing HTML Output
Problem
Solution
Discussion
See Also
18.7. Sending Mail
Problem
Solution
Discussion
See Also
18.8. Creating and Using Page Templates
Problem
Solution
Discussion
See Also
Index
Colophon
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
ASP.NET Cookbook
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset