Summary

In this chapter, you investigated three user controls: The first merely displayed content, the second provided functionality, and the third encapsulated an existing control, adding new functionality. You might want to consider the techniques shown here any time you need to group controls together and use them more than once, or when you need to add your own functionality to an existing control or group of controls. For example, you might want to create the following items:

  • A DataGrid control with sorting capabilities built in

  • A LogIn control that handles authentication for you

  • A data-driven menu system that reads menu items, and perhaps subitems, from a table (or tables)

The possibilities are endless. It is important to remember, however, that user controls don't provide much in the way of design-time experience. If you want to create controls that look and feel like the built-in server controls, you'll need to investigate creating custom controls—a much more difficult process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.7.240