SelectExtensions.DropDownList Method
Returns a select element that lets users select one item.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
DropDownList(HtmlHelper, String) | Returns a single-selection select element using the specified HTML helper and the name of the form field. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem)) | Returns a single-selection select element using the specified HTML helper, the name of the form field, and the specified list items. |
|
DropDownList(HtmlHelper, String, String) | Returns a single-selection select element using the specified HTML helper, the name of the form field, and an option label. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem), IDictionary(String, Object)) | Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem), Object) | Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem), String) | Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and an option label. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem), String, IDictionary(String, Object)) | Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. |
|
DropDownList(HtmlHelper, String, IEnumerable(SelectListItem), String, Object) | Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. |
The DropDownList method renders an element that enables the user to select one item from a drop-down list. Each item in the list is a SelectListItem object.
The difference between calling the DropDownList method and using a select element is that the DropDownList method is designed to make it easy to bind to view data or model data.
Show: