The ListBox Control

The properties and events of the ListBox control are shown in Tables E.9 and E.10.

Table E.9. Properties of the ListBox Control
Property Description
DataMember Gets or sets the specific table in the DataSource to bind to the control.
DataSource Gets or sets the data source that populates the items of the list control.
DataTextField Gets or sets the field of the data source that provides the text content of the list items.
DataTextFormatString Gets or sets the formatting string used to control how data, bound to the list control, is displayed.
DataValueField Gets or sets the field of the data source that provides the value of each list item.
Items Gets the collection of items in the list control.
Rows Gets or sets the number ...

Get Inside ASP.NET 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.