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:
property ListItemCollection^ Items {
	ListItemCollection^ get ();
}
/** @property */
public ListItemCollection get_Items ()

public function get Items () : ListItemCollection

Property Value

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.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: