HtmlSelect::Items Property
Gets a collection that contains the items listed in an HtmlSelect control.
Assembly: System.Web (in System.Web.dll)
[BrowsableAttribute(false)] public: property ListItemCollection^ Items { ListItemCollection^ get (); }
Property Value
Type: System.Web.UI.WebControls::ListItemCollectionA 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.