HtmlSelect::Items Property

 

Gets a collection that contains the items listed in an HtmlSelect control.

Namespace:   System.Web.UI.HtmlControls
Assembly:  System.Web (in System.Web.dll)

public:
[BrowsableAttribute(false)]
property ListItemCollection^ Items {
	ListItemCollection^ get();
}

Property Value

Type: System.Web.UI.WebControls::ListItemCollection^

A System.Web.UI.WebControls::ListItemCollection that contains the items listed in an HtmlSelect control.

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

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

The following code example demonstrates how to use the Items collection to iterate through the items in the HtmlSelect control and determine which items are selected.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: