This abstract base class for all list controls includes data-binding
functionality (such as DataTextFormatString, which
specifies the formatting of bound text), an Items
collection, and properties for returning the first selected item
(SelectedIndex and
SelectedItem).
public abstract class ListControl : WebControl {
// Public Constructors
public
ListControl ( );
// Public Instance Properties
public virtual bool
AutoPostBack {set; get; }
public virtual string
DataMember {set; get; }
public virtual object
DataSource {set; get; }
public virtual string
DataTextField {set; get; }
public virtual string
DataTextFormatString {set; get; }
public virtual string
DataValueField {set; get; }
public virtual ListItemCollection
Items {get; }
public virtual int
SelectedIndex {set; get; }
public virtual ListItem
SelectedItem {get; }
public virtual string
SelectedValue {set; get; }
// Public Instance Methods
public virtual void
ClearSelection ( );
// Protected Instance Methods
protected override void
LoadViewState (object
savedState ); // overrides WebControl
protected override void
OnDataBinding (EventArgs
e ); // overrides System.Web.UI.Control
protected override void
OnPreRender (EventArgs
e ); // overrides System.Web.UI.Control
protected virtual void
OnSelectedIndexChanged ( EventArgs
e );
protected override object
SaveViewState ( ); // overrides WebControl
protected override void
TrackViewState ( ); // overrides WebControl
// Events
public event EventHandler
SelectedIndexChanged ;
}