This documentation is archived and is not being maintained.

ListItem Members

Represents a data item in a data-bound list control. This class cannot be inherited.

The following tables list the members exposed by the ListItem type.

  Name Description
Public method ListItem Overloaded. Initializes a new instance of the ListItem class.

  Name Description
Public property Attributes Gets a collection of attribute name and value pairs for the ListItem that are not directly supported by the class.
Public property Enabled Gets or sets a value indicating whether the list item is enabled.
Public property Selected Gets or sets a value indicating whether the item is selected.
Public property Text Gets or sets the text displayed in a list control for the item represented by the ListItem.
Public property Value Gets or sets the value associated with the ListItem.

(see also Protected Methods )
  Name Description
Public method Equals Overloaded. Overridden. Returns a value indicating whether this instance is equal to a specified object.
Public method Static FromString Creates a ListItem from the specified text.
Public method GetHashCode Overridden. Serves as a hash function for a particular type, and is suitable for use in hashing algorithms and data structures like a hash table.
Public method GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method ToString Overridden.  

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)

  Name Description
Explicit interface implementation Method System.Web.UI.IAttributeAccessor.GetAttribute Returns the attribute value of the list item control having the specified attribute name.
Explicit interface implementation Method System.Web.UI.IAttributeAccessor.SetAttribute Sets an attribute of the list item control with the specified name and value.
Explicit interface implementation Method System.Web.UI.IParserAccessor.AddParsedSubObject Allows the Text property to be persisted as inner content.
Explicit interface implementation Method System.Web.UI.IStateManager.LoadViewState For a description of this member, see IStateManager.LoadViewState.
Explicit interface implementation Method System.Web.UI.IStateManager.SaveViewState For a description of this member, see IStateManager.SaveViewState.
Explicit interface implementation Method System.Web.UI.IStateManager.TrackViewState For a description of this member, see IStateManager.TrackViewState.
Explicit interface implementation Property System.Web.UI.IStateManager.IsTrackingViewState For a description of this member, see IStateManager.IsTrackingViewState.