MultiSelectList Constructor (IEnumerable, String, String, IEnumerable)
Initializes a new instance of the MultiSelectList class by using the items to include in the list, the data value field, the data text field, and the selected values.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration Public Sub New ( _ items As IEnumerable, _ dataValueField As String, _ dataTextField As String, _ selectedValues As IEnumerable _ ) 'Usage Dim items As IEnumerable Dim dataValueField As String Dim dataTextField As String Dim selectedValues As IEnumerable Dim instance As New MultiSelectList(items, dataValueField, _ dataTextField, selectedValues)
Parameters
- items
- Type: System.Collections.IEnumerable
The items.
- dataValueField
- Type: System.String
The data value field.
- dataTextField
- Type: System.String
The data text field.
- selectedValues
- Type: System.Collections.IEnumerable
The selected values.
| Exception | Condition |
|---|---|
| ArgumentNullException | The items parameter is Nothing. |
Show: