Partager via


SelectList Constructor (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.

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 SelectList(
    IEnumerable items,
    string dataValueField,
    string dataTextField
)
public:
SelectList(
    IEnumerable^ items, 
    String^ dataValueField, 
    String^ dataTextField
)

Parameters

See Also

Reference

SelectList Class

SelectList Overload

System.Web.Mvc Namespace