0 out of 1 rated this helpful - Rate this topic

SelectList Class

Represents a list that lets users select one item.

System.Object
  System.Web.Mvc.MultiSelectList
    System.Web.Mvc.SelectList

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public class SelectList : MultiSelectList

The SelectList type exposes the following members.

  Name Description
Public method SelectList(IEnumerable) Initializes a new instance of the SelectList class by using the specified items for the list.
Public method SelectList(IEnumerable, Object) Initializes a new instance of the SelectList class by using the specified items for the list and a selected value.
Public method SelectList(IEnumerable, String, String) Initializes a new instance of the SelectList class by using the specified items for the list, the data value field, and the data text field.
Public method SelectList(IEnumerable, String, String, Object) Initializes a new instance of the SelectList class by using the specified items for the list, the data value field, the data text field, and a selected value.
Top
  Name Description
Public property DataTextField Gets or sets the data text field. (Inherited from MultiSelectList.)
Public property DataValueField Gets or sets the data value field. (Inherited from MultiSelectList.)
Public property Items Gets or sets the items in the list. (Inherited from MultiSelectList.)
Public property SelectedValue Gets the list value that was selected by the user.
Public property SelectedValues Gets or sets the selected values. (Inherited from MultiSelectList.)
Top
  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Returns an enumerator that can be used to iterate through the collection. (Inherited from MultiSelectList.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Top
  Name Description
Explicit interface implemetation Private method IEnumerable.GetEnumerator Returns an enumerator can be used to iterate through a collection. (Inherited from MultiSelectList.)
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)