In this chapter, we looked at complex properties and showed how to enable declarative persistence and design-time support for such properties. We also examined the view state mechanism in detail and showed how to implement state management in a custom type. To illustrate the implementation of complex properties, we developed an ImageMap control that uses many custom types and exposes a collection property that performs its own state management. The ImageMap control can also be a useful addition to the Web Forms toolbox because the set of standard ASP.NET controls does not contain a control that provides map functionality. |