1.0 Introduction

ASP.NET redefined how Microsoft developers write web applications. Formerly, with Microsoft ASP 3.0 and its predecessors, web developers were forced to mix HTML markup with server-side code on the same page. This mixing of presentation and logic in the same code file quickly led to “spaghetti code” that was hard to maintain and even harder to debug.

ASP.NET gave web developers access to the entire .NET Framework and added ASP.NET controls to the existing collection of HTML ones. ASP.NET controls encapsulate the generation of HTML and enable the code-behind application model. Using the code-behind model, developers can cleanly separate their code from their HTML, making applications much easier to debug and maintain.

ASP.NET 1.1 brought in controls to cover the basics of web development and, more importantly, created a powerful and extensible framework for writing web applications. It included the following features:

  • The ability to create your own custom controls that encapsulate common functionality and help prevent code duplication

  • Hooks throughout the entire web request process that make it easy to intercept requests or responses using modules or HTTP handlers

  • ViewState, which uses a hidden form field to persist the state of a form across page postbacks, making it easy to handle events on the server side

The latest release, ASP.NET 2.0, adds an impressive number of new controls and features to this framework, including:

  • Master pages and themes, two technologies that help maintain a common look and feel, as well as common functionality, across an entire application

  • A set of data-source controls that can be paired with other controls to quickly pull information from a database or domain model onto your pages, with no code required

  • Over 50 new controls that make common web operations such as creating user logins, menus, and portals even easier

ASP.NET 1.1 and 2.0 include an impressive amount of functionality, but there’s still room for more. In this chapter, we focus on several tools that can help you add cutting-edge features to your ASP.NET applications. One of the newest technologies to emerge is Ajax (Asynchronous JavaScript and XML). Ajax makes web applications behave more like Windows applications by providing a mechanism to make calls from the browser without performing complete web requests. While the technology to make Ajax happen has been available for some time, it has only become popular in the last year or so. There are a number of ways to implement Ajax in ASP.NET, three of which are covered in this chapter. We’ve also included tools that help you add RSS feeds, charts, and more to your sites.

Tip

ASP.NET applications can be developed in any number of ways, including via Notepad. Please take a look at Chapter 6 to learn more about tools like SharpDevelop and Visual Studio Express, which can help you be very productive as you create your ASP.NET applications.

Get Windows Developer Power Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.