Summary

In this hour we examined three input Web controls whose contents are determined by database data. These three controls—the DropDownList, RadioButtonList, and CheckBoxList—share much in common. They all display a series of items, each of which has the properties Text and Value. The three Web controls each has a DataTextField property that specifies the DataSource field, whose value is assigned to each item's Text property, and a DataValueField, which specifies the field whose value is assigned to each item's Value property. Finally, all three controls have a DataSource property, which specifies the data to be bound to the control, and a DataBind() method, which actually performs the work of binding the data to the Web control.

The first ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.