System.Web.UI.HtmlControls.HtmlSelect.Items Property

Gets a collection that contains the items listed in an System.Web.UI.HtmlControls.HtmlSelect control.

Syntax

[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public System.Web.UI.WebControls.ListItemCollection Items { get; }

Value

a System.Web.UI.WebControls.ListItemCollection

Remarks

Use the HtmlSelect.Items collection to manage the items listed in the System.Web.UI.HtmlControls.HtmlSelect control. You can programmatically add items to, remove items from, and insert items into the collection.

The HtmlSelect.Items collection is commonly used to iterate through the items in the System.Web.UI.HtmlControls.HtmlSelect control. For example, when multiple items are selected, you can iterate through the HtmlSelect.Items collection to determine which items are selected.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0