Next Up: Custom Controls

User controls are powerful devices for capturing complex rendering and behavioral logic in reusable components that can be shared among developers and shared among Web pages. Because the ASP.NET output cache is ASCX-aware, user controls play an important role in performance tuning, too.

The first time I read about user controls, I flatly failed to understand their potential. 鈥淣ice,鈥?I thought to myself. 鈥淢aybe I鈥檒l find a use for them someday.鈥?Since then, I鈥檝e found more uses for user controls than I ever could have imagined. In fact, I鈥檝e come to believe that user controls are among the top three or four most important features of ASP.NET, if only for making Web applications perform better by permitting selected regions of a page to be served from a cache while other regions are generated anew in each request.

Web controls are also high on my favorite features list. Not just because the FCL includes a set of prepackaged controls, but because developers can write controls of their own, better known as 鈥渃ustom controls,鈥?to supplement and extend what the FCL has to offer. Custom controls enjoy powers that user controls never dreamed of and are the key to extending ASP.NET. But don鈥檛 take my word for it. Turn the page and see for yourself.