ListItemCollection

ListItemCollection

System.Web.UI.WebControls (system.web.dll)sealed class

This class contains a collection of ListItem objects, which represents the items in a list control. This collection is used by the ListControl.Items property.

public sealed class ListItemCollection : IList, ICollection, IEnumerable, System.Web.UI.IStateManager {
// Public Constructors
   public ListItemCollection( );
// Public Instance Properties
   public int Capacity{set; get; }
   public int Count{get; }                          // implements ICollection
   public bool IsReadOnly{get; }                    // implements IList
   public bool IsSynchronized{get; }                // implements ICollection
   public object SyncRoot{get; }                    // implements ICollection
   public ListItem this[int index]{get; }
// Public Instance Methods
   public void Add(ListItem item);
   public void Add(string item);
   public void AddRange(ListItem[ ] items);
   public void Clear( );                             // implements IList
   public bool Contains(ListItem item);
   public void CopyTo(Array array, int index);                  // implements ICollection
   public ListItem FindByText(string text);
   public ListItem FindByValue(string value);
   public IEnumerator GetEnumerator( );              // implements IEnumerable
   public int IndexOf(ListItem item);
   public void Insert(int index, ListItem item);
   public void Insert(int index, string item);
   public void Remove(ListItem item);
   public void Remove(string item);
   public void RemoveAt(int index);                // implements IList
}

Returned By

System.Web.UI.HtmlControls.HtmlSelect.Items, ListControl.Items



    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace