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, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.