Chapter 4. Building the user interface with ASP.NET Web Forms

 

This chapter covers

  • New features in Web Forms 4.0
  • ClientID and markup generation
  • Master pages
  • URL rewriting
  • URL routing

All the chapters before this one have been about fundamentals: how ASP.NET works and how to access data. Now that we’ve addressed the basics, it’s time to focus on other matters. This chapter begins the part of the book dedicated to topics related to the user interface (UI).

The approach that’s most used to build a user interface with ASP.NET is to use a Web Form. The Web Form was the first abstraction introduced to create the UI for the ASP.NET application and has its roots in its integration with Visual Studio.

As its name suggests, Web Forms are the result of some tentative steps made by Microsoft in the early 2000s to apply the typical Windows development paradigm to web applications. Windows developers are used to dragging objects on the UI surface and programming them accordingly. This approach is useful for implementing event-based development because each component on the design surface can be programmed that way. Event-based programming is common in a lot of development technologies; from VB 6 to Delphi, generations of developers had been programming this way to increase productivity.

4.1. The UI and Web Forms

4.2. Defining a common UI: using master pages

4.3. URL rewriting and routing with ASP.NET

4.4. Summary