DataTextFormatString
specifies a format string that determines how the
ListBox is displayed
DataValueField
represents the field within the data source to use with
the ListBoxs value
Items
the collection of items within the ListBox
Rows
indicates the number of rows to display within the
ListBox; default value is 4
SelectedIndex
represents the index selected within the ListBox
SelectedItem
represents the item selected within the ListBox
SelectionMode
determines whether or not a user can select more than
one item at a time; possible values are Multiple and
Single
Events
SelectedIndexChanged
raised when an item within the ListBox is selected
Literal
Properties
Text
specifies the text displayed by the control
MultiView
Properties
ActiveViewIndex
specifies the index of the active view
Views
the ViewCollection object representing the collection
of views
Methods
GetActiveView
returns the active view as a View object
624
Appendix A: Web Control Reference

Get Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition 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.