Freigeben über


MultiSelectList Constructor (IEnumerable, String, String)

Initializes a new instance of the MultiSelectList class by using the items to include in the list, the data value field, and the data text field.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Sub New ( _
    items As IEnumerable, _
    dataValueField As String, _
    dataTextField As String _
)
public MultiSelectList(
    IEnumerable items,
    string dataValueField,
    string dataTextField
)
public:
MultiSelectList(
    IEnumerable^ items, 
    String^ dataValueField, 
    String^ dataTextField
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The items parameter is null reference (Nothing in Visual Basic).

See Also

Reference

MultiSelectList Class

MultiSelectList Overload

System.Web.Mvc Namespace