O'Reilly logo

ASP.NET by Example by Steven A. Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Composite Controls

Composite controls are a bit more advanced than the controls we have seen thus far, but they are still fairly simple to build. For one thing, you still do not need to worry about handling PostBacks, because you can rely on all the features of the included controls to work just as if they were placed on the page themselves. Composite controls, because they typically encapsulate several pieces of UI code, are very close in function to user controls, so you will want to consider the differences between user controls and custom controls before you decide which method to use to create the functionality you need.

For this example, we will simply give the user the option of making the YesNoListBox required. To do this, we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required