CodeCharge Studio All C#.NET VB.NET

public class ItemCollection:NameObjectCollectionBase, ICloneable (.NET)

A collection of item objects in a list control.

Properties

Property Description
public ItemValue Item Gets an Item at the specified index or value in the collection. In C#, this property is the indexer for the ItemCollection class

Methods

Property Description
public void Add(string value,string text,bool selected) Appends a item to the end of the collection.
public void Add(string value,string text) Appends a item to the end of the collection.
public void SetSelection(object value) Set selected property to true for a Item from the collection that represents the specified value.
public object Clone() Creates a copy of the current collection.
public void CopyTo(System.Web.UI.WebControls.ListItemCollection col, bool encode) Copies the items from the ItemCollection to the specified ListItemCollection, and apply HTML encode to a Item text.
public void CopyTo(System.Web.UI.WebControls.ListItemCollection col) Copies the items from the ItemCollection to the specified ListItemCollection.
public void Remove(string value) Removes the Item with the specified value from the collection.
public void Clear() Removes all Item objects from the collection.


On-line, printable versions and updates