
User Controls | 119
User and
Server Controls
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
build components, and components are more interoperable across
languages than in the COM world. .NET components can also communi-
cate with COM components through an interoperability layer.
HttpHandlers and HttpModules
HttpHandlers are components that are called to perform the processing of
specific types of requests made to IIS. HttpModules are components that
participate in the processing pipeline of all requests for a given ASP.NET
application. These extensibility techniques are beyond the scope of this book,
but you can get answers to questions on these topics in the HttpHandlers and
HttpModules forum at http://www.asp.net/forums.
The rest of this chapter discusses employing ASP.NET user controls and custom
server controls for reuse and employing custom server controls for extensibility.
The chapter also explains how custom server controls can easily be shared across
multiple applications, making reuse simpler than ever.
User Controls
The simplest form of reuse in classic ASP is the include file. By adding the
following directive:
<!-- #include file = "filename.inc" -->
classic ASP developers can place the contents of the specified file inline with the
page in which the directive appeared. Unfortunately, this reuse technique is a bit
crude and ...