| System.Web.UI.WebControls (system.web.dll) | class |
This class provides a single-selection drop-down list control.
Various properties, such as BorderColor,
BorderStyle, and BorderWidth,
allow you to configure its appearance. To add items programmatically,
use the Items collection or use the
DataBind( ) method to bind to a data source (such
as a System.Data.DataTable or a
System.Array).
Use the SelectedIndex property to determine the
selected item or the SelectedItem property, which
returns a ListItem object that specifies the
associated text.
public class DropDownList : ListControl, System.Web.UI.IPostBackDataHandler {
// Public Constructors
public
DropDownList ( );
// 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 override int
SelectedIndex {set; get; } // overrides ListControl
public override string
ToolTip {set; get; } // overrides WebControl
// Protected Instance Methods
protected override void
AddAttributesToRender (System.Web.UI.HtmlTextWriter
writer );// overrides WebControl
protected override ControlCollection
CreateControlCollection ( ); // overrides System.Web.UI.Control
protected override void
RenderContents (System.Web.UI.HtmlTextWriter
writer ); // overrides WebControl
}
Hierarchy
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
DropDownList(System.Web.UI.IPostBackDataHandler)