Overview of Custom Control Building
Answer two questions before writing a custom control:
• What type of control do I want to write?
• From what class do I inherit?
The two basic types of controls are fully rendered and composite controls. When you build a fully rendered control, you start from scratch. You specify all the HTML content that the control renders to the browser.
When you create a composite control, on the other hand, you build a new control from existing controls. For example, you can create a composite AddressForm
control from existing TextBox
and RequiredFieldValidator
controls. When you create a composite control, you bundle together existing controls as a new control and potentially add new behaviors and properties.
The second ...
Get ASP.NET 4 Unleashed 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.