In recent years, the cutting edge of software development has shifted from traditional 鈥渇at client鈥?apps to Web apps. The integration of back-end systems and seamless data sharing, once the holy grail of corporate IT departments, have given way to concerns over lower total cost of ownership (TCO), zero-footprint installs, and the ability to run applications from anywhere an Internet connection is available. The number one challenge that confronts developers today? 鈥淢ake this software run on the Web.鈥?Unfortunately, Web programming isn鈥檛 easy. Writing applications like Microsoft Word and Microsoft Excel is a well understood art form. Writing applications like eBay and Amazon.com is not. To make matters worse, Web development today is practiced with first-generation tools and technologies that have more in common with 1960s-era Dartmouth BASIC than the modern platforms and development environments that developers have become accustomed to.
Microsoft鈥檚 answer to the sordid state of Web programming today is a second-generation programming model called Web Forms. The Web Forms model is part of ASP.NET, which in turn is part of the Microsoft .NET Framework. Just as Active Server Pages (ASP) revolutionized Web programming in the 1990s with an easy-to-use model for dynamically generating HTML on Web servers, ASP.NET advances the state of the art in Web programming by introducing reusable server controls that render HTML to browser clients and fire events that can be processed by server-side scripts. That鈥檚 Web Forms in a nutshell: Web pages built around controls and event handlers. If the concept is alluring, the implementation is downright brilliant. Once you learn to build Web apps the Web Forms way, you鈥檒l never want to build them any other way again.
This chapter introduces the Web Forms programming model by describing how to build Web forms both with and without Visual Studio .NET. First you鈥檒l nail down the basics by building Web forms by hand. Then you鈥檒l switch to Visual Studio .NET and experience rapid application development (RAD), Internet-style. Along the way, you鈥檒l be introduced to important Web Forms programming techniques such as code-behind and dynamic control initialization.
Before you begin, it鈥檚 worth noting what software you need to run this chapter鈥檚 sample programs. First and foremost, you need the .NET Framework. Second, you need Microsoft Internet Information Services (IIS), which is Microsoft鈥檚 Web server software. Finally, you need ASP.NET. ASP.NET is automatically installed when you install the .NET Framework SDK on a platform that supports ASP.NET. Currently those platforms include Windows 2000 and Windows XP. Be sure to install IIS before you install the Framework SDK, or you鈥檒l have to go back and install ASP.NET separately.