SelectList SelectList SelectList Constructors

Definition

Overloads

SelectList(IEnumerable) SelectList(IEnumerable) SelectList(IEnumerable)

Initializes a new instance of the SelectList class by using the specified items for the list.

SelectList(IEnumerable, Object) SelectList(IEnumerable, Object) 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, Object, IEnumerable) SelectList(IEnumerable, Object, IEnumerable) SelectList(IEnumerable, Object, IEnumerable)

Initializes a new instance of the SelectList class by using the specified items for the list, the selected value, and the disabled values.

SelectList(IEnumerable, String, String) SelectList(IEnumerable, String, String) 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) SelectList(IEnumerable, String, String, Object) 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.

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

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

SelectList(IEnumerable, String, String, String, Object) SelectList(IEnumerable, String, String, String, Object) SelectList(IEnumerable, String, 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, the data group field, and the selected value.

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

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

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

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

SelectList(IEnumerable) SelectList(IEnumerable) SelectList(IEnumerable)

Initializes a new instance of the SelectList class by using the specified items for the list.

public SelectList (System.Collections.IEnumerable items);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable)

Parameters

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

Initializes a new instance of the SelectList class by using the specified items for the list and a selected value.

public SelectList (System.Collections.IEnumerable items, object selectedValue);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * obj -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, selectedValue As Object)

Parameters

selectedValue
Object Object Object

The selected value.

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

Initializes a new instance of the SelectList class by using the specified items for the list, the selected value, and the disabled values.

public SelectList (System.Collections.IEnumerable items, object selectedValue, System.Collections.IEnumerable disabledValues);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * obj * System.Collections.IEnumerable -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, selectedValue As Object, disabledValues As IEnumerable)

Parameters

items
IEnumerable IEnumerable IEnumerable

The items used to build each SelectListItem of the list.

selectedValue
Object Object Object

The selected value. Used to match the Selected property of the corresponding SelectListItem.

disabledValues
IEnumerable IEnumerable IEnumerable

The disabled values. Used to match the Disabled property of the corresponding SelectListItem.

SelectList(IEnumerable, String, String) SelectList(IEnumerable, String, String) 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 SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String)

Parameters

dataValueField
String String String

The data value field.

dataTextField
String String String

The data text field.

SelectList(IEnumerable, String, String, Object) SelectList(IEnumerable, String, String, Object) 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.

public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField, object selectedValue);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string * obj -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String, selectedValue As Object)

Parameters

dataValueField
String String String

The data value field.

dataTextField
String String String

The data text field.

selectedValue
Object Object Object

The selected value.

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

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

public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField, object selectedValue, System.Collections.IEnumerable disabledValues);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string * obj * System.Collections.IEnumerable -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String, selectedValue As Object, disabledValues As IEnumerable)

Parameters

items
IEnumerable IEnumerable IEnumerable

The items used to build each SelectListItem of the list.

dataValueField
String String String

The data value field. Used to match the Value property of the corresponding SelectListItem.

dataTextField
String String String

The data text field. Used to match the Text property of the corresponding SelectListItem.

selectedValue
Object Object Object

The selected value. Used to match the Selected property of the corresponding SelectListItem.

disabledValues
IEnumerable IEnumerable IEnumerable

The disabled values. Used to match the Disabled property of the corresponding SelectListItem.

SelectList(IEnumerable, String, String, String, Object) SelectList(IEnumerable, String, String, String, Object) SelectList(IEnumerable, String, 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, the data group field, and the selected value.

public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField, string dataGroupField, object selectedValue);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string * string * obj -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String, dataGroupField As String, selectedValue As Object)

Parameters

items
IEnumerable IEnumerable IEnumerable

The items used to build each SelectListItem of the list.

dataValueField
String String String

The data value field. Used to match the Value property of the corresponding SelectListItem.

dataTextField
String String String

The data text field. Used to match the Text property of the corresponding SelectListItem.

dataGroupField
String String String

The data group field. Used to match the Group property of the corresponding SelectListItem.

selectedValue
Object Object Object

The selected value. Used to match the Selected property of the corresponding SelectListItem.

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

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

public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField, string dataGroupField, object selectedValue, System.Collections.IEnumerable disabledValues);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string * string * obj * System.Collections.IEnumerable -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String, dataGroupField As String, selectedValue As Object, disabledValues As IEnumerable)

Parameters

items
IEnumerable IEnumerable IEnumerable

The items used to build each SelectListItem of the list.

dataValueField
String String String

The data value field. Used to match the Value property of the corresponding SelectListItem.

dataTextField
String String String

The data text field. Used to match the Text property of the corresponding SelectListItem.

dataGroupField
String String String

The data group field. Used to match the Group property of the corresponding SelectListItem.

selectedValue
Object Object Object

The selected value. Used to match the Selected property of the corresponding SelectListItem.

disabledValues
IEnumerable IEnumerable IEnumerable

The disabled values. Used to match the Disabled property of the corresponding SelectListItem.

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

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

public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField, string dataGroupField, object selectedValue, System.Collections.IEnumerable disabledValues, System.Collections.IEnumerable disabledGroups);
new System.Web.Mvc.SelectList : System.Collections.IEnumerable * string * string * string * obj * System.Collections.IEnumerable * System.Collections.IEnumerable -> System.Web.Mvc.SelectList
Public Sub New (items As IEnumerable, dataValueField As String, dataTextField As String, dataGroupField As String, selectedValue As Object, disabledValues As IEnumerable, disabledGroups As IEnumerable)

Parameters

items
IEnumerable IEnumerable IEnumerable

The items used to build each SelectListItem of the list.

dataValueField
String String String

The data value field. Used to match the Value property of the corresponding SelectListItem.

dataTextField
String String String

The data text field. Used to match the Text property of the corresponding SelectListItem.

dataGroupField
String String String

The data group field. Used to match the Group property of the corresponding SelectListItem.

selectedValue
Object Object Object

The selected value. Used to match the Selected property of the corresponding SelectListItem.

disabledValues
IEnumerable IEnumerable IEnumerable

The disabled values. Used to match the Disabled property of the corresponding SelectListItem.

disabledGroups
IEnumerable IEnumerable IEnumerable

The disabled groups. Used to match the Disabled property of the corresponding SelectListGroup.

Applies to