Export (0) Print
Expand All

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

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, _
	selectedValue As Object _
)
'Usage
Dim items As IEnumerable 
Dim dataValueField As String 
Dim dataTextField As String 
Dim selectedValue As Object 

Dim instance As New SelectList(items, dataValueField, _
	dataTextField, selectedValue)

Parameters

items
Type: System.Collections.IEnumerable

The items.

dataValueField
Type: System.String

The data value field.

dataTextField
Type: System.String

The data text field.

selectedValue
Type: System.Object

The selected value.

Show:
© 2014 Microsoft