System.Web.UI.WebControls (system.web.dll)class

This class represents a list box control. Use the Rows property to set how many rows you want to be displayed in the control at once (and hence, how much space the list box will occupy). You can also set the SelectionMode property to ListSelectionMode.Multiple if you want a user to be able to select more than one item from the list box at once.

Most of the list-specific functionality, such as determining the selected item and reacting to a SelectedIndexChanged event, is provided by the ListControl class, which ListBox inherits from.

public class ListBox : ListControl, System.Web.UI.IPostBackDataHandler {
// Public Constructors
   public ListBox( );
// Public Instance Properties
   public override Color BorderColor{set; get; }                 // overrides WebControl
   public override BorderStyle BorderStyle{set; get; }           // overrides WebControl
   public override Unit BorderWidth{set; get; }                  // overrides WebControl
   public virtual int Rows{set; get; }
   public virtual ListSelectionMode SelectionMode{set; get; }
   public override string ToolTip{set; get; }       // overrides WebControl
// Protected Instance Methods
   protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer);// overrides WebControl
   protected override void OnPreRender(EventArgs e);            // overrides ListControl
   protected override void RenderContents(System.Web.UI.HtmlTextWriter writer);  // overrides WebControl


System.Object System.Web.UI.Control(System.ComponentModel.IComponent, System.IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor) WebControl(System.Web.UI.IAttributeAccessor) ListControl ListBox(System.Web.UI.IPostBackDataHandler)

    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace