ASP.NET offers three main server-side development models for building Web applications:
Web Forms was the original Web development model in .NET and is now in version 4.5. MVC was first released in March 2009 and is now in version 4. Web Pages (and the associated Razor view engine) was first released in January 2011 and is now in version 2.
The goal of Web Forms is to make the Web development experience as close to the Windows Forms (or Classic VB) development experience as possible. You build pages by dragging and dropping controls on a design surface, you set properties of those controls though the Properties window, and you add event handlers by double-clicking the controls. This gives separation between the code generated by the designer and the code you write.
Following the premise that the most effective way to learn a new technology is to use it, you'll now walk through a sample application of the core features of Web Forms. You can follow along with the instructions below or you can examine the project included with the code downloads for the book.
Open Visual Studio and select File ⇒ New ⇒ Project. In the New Project dialog, select the ASP.NET Web Forms Application template, set the Name to WebFormsDemo, and click the OK button (see Figure 14.1).
The project created by the template is a working Web application containing several sample ...