Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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)

public MultiSelectList(
	IEnumerable items,
	string dataValueField,
	string dataTextField,
	IEnumerable 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.

ExceptionCondition
ArgumentNullException

The items parameter is null.

Show:
© 2015 Microsoft