SelectList Class
Represents a list that lets users select one item.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The SelectList type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | SelectList(IEnumerable) | Initializes a new instance of the SelectList class by using the specified items for the list. |
![]() | SelectList(IEnumerable, Object) | Initializes a new instance of the SelectList class by using the specified items for the list and a selected value. |
![]() | 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. |
![]() | 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. |
| Name | Description | |
|---|---|---|
![]() | DataTextField | Gets or sets the data text field. (Inherited from MultiSelectList.) |
![]() | DataValueField | Gets or sets the data value field. (Inherited from MultiSelectList.) |
![]() | Items | Gets or sets the items in the list. (Inherited from MultiSelectList.) |
![]() | SelectedValue | Gets the list value that was selected by the user. |
![]() | SelectedValues | Gets or sets the selected values. (Inherited from MultiSelectList.) |
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetEnumerator | Returns an enumerator that can be used to iterate through the collection. (Inherited from MultiSelectList.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IEnumerable::GetEnumerator | Returns an enumerator can be used to iterate through a collection. (Inherited from MultiSelectList.) |
Show:
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)
.gif?cs-save-lang=1&cs-lang=cpp)