John Kauffman was born in Philadelphia, the son of a chemist and a nurse. He received his degrees from The Pennsylvania State University, the colleges of Science and Agriculture. His early research was for Hershey foods in the genetics of the chocolate tree and the molecular biology of chocolate production. Subsequently, he moved to the Rockefeller University, where he cloned and sequenced DNA regions that control the day and night cycles of plants. Since 1997, John has written ten books, six of which have been on the Amazon Computer Best Seller List. His specialty is programming Web front-ends for enterprise-level databases. In his spare time, John is an avid sailor and youth sailing coach. He represented the USA in the sailing World Championship of 1985 and assisted the Olympic teams of Belgium and China in 1996. He also enjoys jazz music and drumming and manages to read the New Yorker from cover-to-cover each week. My portions of this book are dedicated to the instructors of two drum and bugle corps. These men taught me about precision, accuracy, and discipline: Ken Green and John Flowers of the Belvederes 1976 and Dennis DeLucia and Bobby Hoffman of the Bayonne Bridgemen 1978. John Kauffman contributed Chapters 2, 3, 4, 5, 6, and Appendix B to this book.,
Chris Hart is a full-time .NET Developer and part-time author who lives in Birmingham (UK) with her husband James. While she's most at home in the world of the Web, she's recently been working with the .NET Compact Framework. In her spare time, Chris spends much of her time playing with beta technologies, and then attempting to write about them. Chris has contributed many chapters to a variety of books, including Beginning ASP.NET (Wrox Press), Beginning Dynamic Websites with ASP.NET Web Matrix (Wrox Press), and most recently, A Programmer's Guide to SQL (Apress). When she gets away from computers, Chris enjoys travel, especially when it involves driving along narrow winding roads to get to out-of-the-way parts of Scotland. She dreams of building her own house somewhere where she can keep a cat. Chris Hart contributed Chapters 10, 11, 12, 13, and Appendices C and D to this book.
Dave Sussman is a writer, trainer, and consultant, living in the wilds of the Oxfordshire countryside. He's been working with ASP.NET since before it was first released and still isn't bored with it. You can contact him at email is hidden. Dave Sussman contributed Chapters 7, 8, and 9 to this book.
Dan Maharry is a freelance writer, reviewer, speaker, and editor who has, in no particular order, taught English, Math, and Guitar, directed, crewed, acted in, and produced several plays and short films, been a film and music columnist for four years, co-founded ASPToday.com, rewritten his own at HMobius.com several times, opened an office in India, variously edited, reviewed, and written pieces of over 40 programming books, qualified as a sound engineer, and consumed enough caffeine in his lifetime to keep most of China awake for a week. Occasionally, he sleeps. Sometimes. Contact him at email is hidden. "With deep-felt love to Jane, and in memoriam to John Kauffman's father." Dan Maharry contributed Chapters 5 and 6 to this book.,
Authors Executive Editorial Director Chris Ullman Mary Bednarek John Kauffman Chris Hart Project Coordinator Dave Sussman Mary Richards Daniel Maharry Project Manager Senior Acquisitions Editor Ami Frank Sullivan Jim Minatel Senior Production Manager Vice President & Executive Group Fred Bernardi Publisher Richard Swadley Editorial Manager Mary Beth Wakefield Vice President and Executive Publisher Bob Ipsen Book Producer Peer Technical Services Pvt. Ltd. Vice President and Publisher Joseph B. Wikert,
Contents Introduction xxi Chapter 1: Getting Started with ASP.NET 1
What Is a Static Web Page? 2 How Are Static Web Pages Served? 3 Limitations of Static Web Pages 4 What Is a Web Server? 5 How Are Dynamic Web Pages Served? 6 Client-Side Dynamic Web Pages 6 Server-Side Dynamic Web Pages 7 What Is ASP.NET? 9 How Does ASP.NET Differ from ASP? 9 Using C# with ASP.NET 10 I'm Still Confused about ASP, ASP.NET, and C# 11 The Installation Process 11 Which Operating System Do You Have? 11 Prerequisites for Installing ASP.NET 12 Try It Out Installing MDAC 2.8 13 Installing ASP.NET and the .NET Framework 13 Try It Out Installing the .NET Framework Redistributable 14 Installing Web Matrix 15 Try It Out Installing Web Matrix 16 Configuring Web Matrix to Run with .NET Framework 1.1 18 Try It Out Configuring Web Matrix 18 Running Web Matrix and Setting Up the Web Server 19 Try It Out Starting the Web Server 19 ASP.NET Test Example 25 Try It Out Your First ASP.NET Web Page 25 ASP.NET Troubleshooting 28 Page Cannot Be Displayed: HTTP Error 403 29 Page Cannot Be Found: HTTP Error 404 30 Web Page Unavailable While Offline 31 I Just Get a Blank Page 31 The Page Displays the Message But Not the Time 31 I Get an Error Statement Citing a Server Error 32 I Have a Different Problem 33 Summary 33,
Contents Chapter 2: Anatomy of an ASP.NET Page 35
What Is .NET? 35 From Your Code to Machine Code 37 Introducing Two Intermediate Languages 37 Objects 38 The .NET Base Classes 39 The Class Browser 40 How ASP.NET Works 41 Saving Your ASP.NET Files with an ASPX Suffix 42 Inserting ASP.NET Code into Our Web Pages 42 Try It Out Inserting Server-Side (ASP.NET) Code 44 Try It Out Interweaving ASP.NET Output with HTML 49 ASP.NET in Action 51 Binding to a Database 51 Try It Out Binding to a Database 51 Binding to a Simple XML File 54 Try It Out Binding to a Simple XML Document 54 Summary 57 Exercises 58
Chapter 3: Server Controls and Variables 59
Forms 60 Web Pages, HTML Forms, and Web Forms 60 Request and Response in Non-ASP.NET Pages 61 Where ASP.NET Fits in with the .NET Framework 63 The