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

Changing the Layout of List Controls

Up to this point, you've seen how to manipulate list control selections, create and remove items programmatically, as well as how to bind these controls to external data sources. Now we'll look at how to control the layout of the two list controls that support this feature, CheckBoxList and RadioButtonList.

Using RepeatLayout

The first tool at our disposal for changing the layout of these two list controls is the RepeatLayout property. This property has two possible values: Table (default) and Flow. When RepeatLayout is set to Table, the list items are rendered within a <table> so that the items are distributed evenly. When set to Flow, the list items flow according to the surrounding HTML on the page. Listing ...

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