Chapter 12. Composite Controls


Composite controls contain other controls and reuse their functionality via class composition. A composite control delegates responsibility to its child controls while defining its own object model, which is independent of the controls it contains. Composite controls are equivalent to user controls, which we described in Chapter 4, "User Controls: From Page to Control." However, user controls are deployed as text files, while composite controls are precompiled and deployed in binary assembly files, as other custom controls are. In Chapter 6, "Custom Controls vs. User Controls," we provided guidelines to help you choose between user controls and custom controls.

In this chapter, we will look at the basic implementation pattern of composite controls as well as related features such as event bubbling and styles. We will also examine templated controls, an important subset of composite controls. A templated control allows page developers to specify some or all of its user interface via declarative page syntax contained in one or more templates. Templated controls therefore have dynamic content and layout and offer significant customization capabilities to page developers.



Developing Microsoft ASP. NET Server Controls and Components
Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer)
ISBN: 0735615829
EAN: 2147483647
Year: 2005
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net