Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As you already know, one of ASP.NET's greatest strengths is its extensible architecture. Throughout this book, you've learned how to customize the way ASP.NET processes requests, reads configuration files, and uses countless provider-based features from membership to profiles. Custom controls are one more avenue of advancement—they allow you to build your own well-encapsulated graphical widgets that you can drop into any page in any web application. Sometimes, the goal of a first-rate custom control is to provide a nice wrapper around a fancy piece of HTML markup. More often, custom controls are used to standardize a piece of page functionality and formalize the way it interacts with the page code so that you can reuse it effortlessly.
In Chapter 27, you'll learn how to build basic ASP.NET controls. You'll begin with simple controls that render their HTML from scratch. You'll learn a host of important techniques, including mechanisms to retain state information, support style attributes, preserve compatibility with different browsers, and trigger postback events. Later, you'll consider other types of custom controls, such as composite controls that are built out of smaller pieces and derived controls that extend ASP.NET staples.
In Chapter 28, you'll tackle a different technique for web-page design and learn how you can render custom image content that you can then place in a web page (with the help of the familiar <img> tag). You'll also learn how to streamline the process by wrapping your drawing logic in a custom control.
In Chapter 29 and Chapter 30, you'll dive into client-side programming and see how you can outfit your pages with JavaScript and use Ajax techniques to create more dynamic, responsive user interfaces.
Finally, in Chapter 31 you'll consider a whole new family of web controls—the web parts that allow you to build flexible portal-style web pages. You'll learn how to use the existing set of ASP.NET web parts and how to create your own reusable web parts.