Chapter 16 - User Controls and Custom Controls | |
bySimon Robinsonet al. | |
Wrox Press 2002 | |
In this chapter we have looked at the various ways we can create reusable ASP.NET server controls using C#. We have seen how to create simple user controls from existing ASP.NET pages, and also how to create custom controls from scratch.
There is a lot we can do with custom controls, and unfortunately it would have been impossible to cover all of it in a single chapter. However, hopefully there is enough information here to get you started. In particular it would have been interesting to have looked at data-binding, and how we can create our controls with this in mind, and a more in-depth look at many areas (particularly an extended coverage of properties and control builders) would also have been fruitful. Unfortunately, topics such as these are really better suited to more specialized books. You can find lots of great information in Professional ASP.NET Server Controls ISBN 1-861005-64-4, also published by Wrox Press.
In this chapter we have covered the following:
Building and consuming simple User Controls
Building and consuming Custom Controls
Maintaining State in Custom Controls
Creating a Composite Custom Control
Adding Custom Event Handlers