Cover image for Learning ASP.NET 3.5, 2nd Edition

Book description

With this book, you will learn how to create engaging and interactive web applications using the latest version of the world's most popular web development platform: ASP.NET with AJAX, built on the productivity-enhancing features of Visual Studio 2008. All you need to get started is a basic knowledge of HTML and a desire to produce professional quality websites. Learning ASP.NET 3.5 introduces new skills in each new chapter and offers fully annotated and fully functional examples that you can put to work immediately. Each chapter adds detailed summaries, practice questions to ensure comprehension, and exercises so you can apply what you've learned to new situations. Written by the bestselling author team of Jesse Liberty, Dan Hurwitz, and Brian MacDonald, Learning ASP.NET 3.5 offers complete, up-to-date coverage of ASP.NET 3.5 and AJAX. The book includes:

  • Chapters that are designed as a series of tutorials on different aspects of web development

  • Examples in each chapter that illustrate how a new concept works. Different chapters feature either a single running example with several stages, or a series of smaller examples

  • A single large example in the final chapter offers that uses everything the reader has learned

  • VB, JavaScript, and SQL Cheat Sheet sidebars to help readers with no little or no background with those topics

  • AJAX-style fully integrated into ASP.NET programming -- the way it should be taught and used

If you want to get up to speed with the world's most popular web development technology, Learning ASP.NET 3.5 is the best resource for the job.

Table of Contents

  1. Learning ASP.NET 3.5, 2nd Edition
  2. A Note Regarding Supplemental Files
  3. Preface
    1. About This Book
    2. About This Series
    3. Learning or Programming?
    4. VB Versus C#
    5. How This Book Is Organized
    6. Conventions Used in This Book
    7. Support: A Note from Jesse Liberty
    8. Using Code Examples
    9. We’d Like to Hear from You
    10. Safari® Books Online
    11. Acknowledgments
      1. From Jesse Liberty
      2. From Dan Hurwitz
      3. From Brian MacDonald
  4. 1. Getting Started
    1. Hello World
    2. Creating a New Web Site
    3. Creating HelloWorld
    4. Making the HelloWorld Web Site Interactive
    5. What You Just Did
    6. Summary
    7. BRAIN BUILDER
      1. Quiz
      2. Exercise
  5. 2. Building Web Applications
    1. Mastering Web Site Fundamentals
      1. The Page
      2. Controls
      3. Code-Behind Files
      4. Events and Postbacks
      5. Synchronous and Asynchronous Postbacks
        1. The Page Load event and synchronous postback
        2. Adding asynchronous postbacks
    2. Using Controls
      1. Organizing the Properties Window
        1. Finding properties with IntelliSense
      2. Basic Controls
      3. Creating Tables
      4. Setting Properties
      5. Selection Controls
      6. Panels
      7. List Selection Controls
        1. Adding items with the Item editor
        2. Adding items in Source view
      8. More Selection Controls
      9. Using Selections to Display Text
      10. Images
      11. Links
      12. LinkButtons
    3. Source Code
    4. Summary
    5. BRAIN BUILDER
      1. Quiz
      2. Exercises
  6. 3. Snappier Web Sites with AJAX
    1. Take a Walk on the Client Side
    2. ScriptManager and UpdatePanel
    3. Controlling Browser History
    4. Extending Controls with the Control Toolkit
    5. TextBoxWaterMarkExtender
    6. PopupControlExtender
    7. CollapsiblePanelExtender
    8. Source Code Listing
    9. Summary
    10. BRAIN BUILDER
      1. Quiz
    11. Exercises
  7. 4. Saving and Retrieving Data
    1. Getting Data from a Database
    2. Binding Data Controls
    3. Create a Sample Web Page
    4. Using a DataSource Control
    5. Pay No Attention to That Man Behind the Curtain
    6. GridView Control
    7. Auto-Generated Code
    8. Adding Insert, Update, and Delete Statements
    9. Displaying and Updating the Data
    10. Take It for a Spin
    11. Modifying the Grid Based on Conditions
    12. Selecting Data from the GridView
    13. Passing Parameters to the SELECT Query
    14. LINQ
    15. Creating the Object Model
    16. Using the Object Model
    17. Editing Data in LINQ
    18. ASP.NET Dynamic Data
    19. Source Code Listings
    20. Summary
    21. BRAIN BUILDER
      1. Quiz
      2. Exercises
  8. 5. Validation
    1. Validation Controls
    2. The RequiredFieldValidator
    3. The Summary Control
    4. The Compare Validator
      1. Checking the Input Type
      2. Comparing to Another Control
    5. Range Checking
    6. Regular Expressions
    7. Custom Validation
    8. Summary
    9. BRAIN BUILDER
      1. Quiz
    10. Exercises
  9. 6. Style Sheets, Master Pages, and Navigation
    1. Styles and Style Sheets
    2. Cascading Styles
    3. Inline Styles
      1. Pros and cons
    4. Document-Level Styles
      1. Pros and cons
    5. External Style Sheets
    6. Master Pages
      1. Creating a Master Page
    7. Adding Content Pages
    8. Using Nested Master Pages
    9. Changing the Master Page at Runtime
    10. Navigation
    11. Buttons and HyperLinks
    12. Menus and Bread Crumbs
    13. Site Maps
    14. Using Sitemaps
      1. TreeView
      2. Customizing the look and feel of the TreeView
      3. Replacing the TreeView with a menu control
      4. Accessing site map nodes programmatically
    15. Bread Crumbs
    16. Summary
    17. BRAIN BUILDER
      1. Quiz
      2. Exercises
  10. 7. State and Life Cycle
    1. Page Life Cycle
    2. State
      1. View State
      2. Session State
      3. Application State
    3. Summary
    4. BRAIN BUILDER
      1. Quiz
    5. Exercises
  11. 8. Errors, Exceptions, and Bugs, Oh My!
    1. Creating the Sample Application
    2. Tracing
      1. Page-Level Tracing
      2. Inserting into the Trace Log
    3. Debugging
      1. The Debug Toolbar
      2. Breakpoints
        1. Setting a breakpoint
        2. Breakpoints window
        3. Breakpoint properties
        4. Breakpoint icons
      3. Stepping Through Code
      4. Examining Variables and Objects
      5. Debug Windows
        1. Immediate window
        2. Locals window
        3. Watch window
        4. Call Stack window
    4. Error Handling
      1. Unhandled Errors
      2. Application-Wide Error Pages
      3. Page-Specific Error Pages
    5. Summary
    6. BRAIN BUILDER
      1. Quiz
      2. Exercises
  12. 9. Security
    1. Forms-Based Security
    2. Creating Users with the WAT
    3. Managing Users Programmatically
      1. Creating User Accounts
      2. Creating a Welcome Page
      3. Creating a Login Page
    4. Roles
    5. Restricting Access
      1. Testing for Login Status
      2. Testing for Role-Based Authentication Membership
    6. Summary
    7. BRAIN BUILDER
      1. Quiz
      2. Exercises
  13. 10. Personalization
    1. Profiles
      1. Simple Data Types
      2. Complex Data Types
    2. Anonymous Personalization
      1. Adding an Anonymous Profile
      2. Migrating Anonymous Data to an Actual User’s Record
    3. Themes and Skins
      1. Create the Test Site
      2. Organize Site Themes and Skins
      3. Enable Themes and Skins
      4. Specify Themes for Your Page
      5. Using Named Skins
    4. Summary
    5. BRAIN BUILDER
      1. Quiz
      2. Exercises
  14. 11. Putting It All Together
    1. Getting Started
    2. Adding Styles
    3. Using Master Pages
    4. Setting Up Roles and Users
    5. Logging In
    6. Navigation
    7. Products Page
    8. Adding AJAX
    9. Cart Page
    10. Purchase Page
    11. Confirm Page
    12. Custom Error Pages
    13. Summary
    14. Source Code Listings
      1. Cart Page
      2. Confirm Page
      3. Home Page
      4. Login Page
      5. Master Page
      6. Products Page
      7. Purchase Page
      8. Web.config
  15. A. Installing the Stuff You’ll Need
    1. What Hardware and Software You’ll Need
    2. Visual Web Developer
      1. Installing VWD
      2. Configuring SQL Server Express
      3. Using the AdventureWorks Sample Database
    3. Visual Studio 2008
      1. Installing Visual Studio 2008
    4. ASP.NET AJAX Control Toolkit
  16. B. Copying a Web Site
    1. Virtual Directories
      1. Outside the IDE
      2. Inside the IDE
    2. Copying the Web Site Without Using the IDE
    3. Copying the Web Site with the IDE
  17. C. Publishing Your Web Site
    1. Using a Hosting Company
      1. Database Support
      2. Your Domain Name
    2. Example: Getting Set Up on a Hosting Site
      1. Picking a Hosting Site
      2. Setting Up the Account
      3. Uploading the Web Site Files
      4. Uploading Data
        1. Creating the script
        2. Logging Into the hosting database and running the script
        3. Updating the Connection Strings
      5. Notes and Tips
    3. Hosting Your Own Site
      1. Running Web Server Software
      2. Security
      3. Configuring the Firewall
      4. Hosting a Web Site Under IIS
        1. IIS 7
        2. IIS 6
      5. Setting Up the Domain Name
    4. Further Resources
  18. D. Answers to Quizzes and Exercises
    1. Chapter 1: Getting Started
      1. Answers to Quiz Questions
      2. Answer to Exercise
    2. Chapter 2: Building Web Applications
      1. Answers to Quiz Questions
      2. Answers to Exercises
    3. Chapter 3: Snappier Web Sites with AJAX
      1. Answers to Quiz Questions
      2. Answers to Exercises
    4. Chapter 4: Saving and Retrieving Data
      1. Answers to Quiz Questions
      2. Answers to Exercises
    5. Chapter 5: Validation
      1. Answers to Quiz Questions
      2. Answers to Exercises
    6. Chapter 6: Style Sheets, Master Pages, and Navigation
      1. Answers to Quiz Questions
      2. Answers to Exercises
    7. Chapter 7: State and Life Cycle
      1. Answers to Quiz Questions
      2. Answers to Exercises
    8. Chapter 8: Errors, Exceptions, and Bugs, Oh My!
      1. Answers to Quiz Questions
      2. Answers to Exercises
    9. Chapter 9: Security
      1. Answers to Quiz Questions
      2. Answers to Exercises
    10. Chapter 10: Personalization
      1. Answers to Quiz Questions
      2. Answers to Exercises
  19. Index
  20. About the Authors
  21. Colophon
  22. Copyright