SelectList Class

Definition

Represents a list that lets users select a single item. This class is typically rendered as an HTML <select> element with the specified collection of SelectListItem objects.

public ref class SelectList : Microsoft::AspNetCore::Mvc::Rendering::MultiSelectList
public class SelectList : Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList
type SelectList = class
    inherit MultiSelectList
Public Class SelectList
Inherits MultiSelectList
Inheritance
SelectList

Constructors

SelectList(IEnumerable)

Initialize a new instance of SelectList.

SelectList(IEnumerable, Object)

Initialize a new instance of SelectList.

SelectList(IEnumerable, String, String)

Initialize a new instance of SelectList.

SelectList(IEnumerable, String, String, Object)

Initialize a new instance of SelectList.

SelectList(IEnumerable, String, String, Object, String)

Initializes a new instance of the SelectList class by using the specified items for the list, the data value field, the data text field, a selected value, and the data group field.

Properties

DataGroupField

Gets the data group field.

(Inherited from MultiSelectList)
DataTextField

Gets the data text field.

(Inherited from MultiSelectList)
DataValueField

Gets the data value field.

(Inherited from MultiSelectList)
Items

Gets the items.

(Inherited from MultiSelectList)
SelectedValue

The selected value.

SelectedValues

Gets the selected values.

(Inherited from MultiSelectList)

Methods

GetEnumerator() (Inherited from MultiSelectList)

Explicit Interface Implementations

IEnumerable.GetEnumerator() (Inherited from MultiSelectList)

Applies to