Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Include Protected Members
Include Inherited Members
Returns a select element that lets users select one or more items.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
![]() ![]() |
ListBox(HtmlHelper, String) | Returns a multi-select select element using the specified HTML helper and the name of the form field. |
![]() ![]() |
ListBox(HtmlHelper, String, IEnumerable<SelectListItem>) | Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. |
![]() ![]() |
ListBox(HtmlHelper, String, IEnumerable<SelectListItem>, IDictionary<String, Object>) | Returns a multi-select select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HMTL attributes. |
![]() ![]() |
ListBox(HtmlHelper, String, IEnumerable<SelectListItem>, Object) | Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. |
Top
Remarks
The ListBox method renders an element that enables the user to select from a scrolling list of items. Each item in the list is a SelectListItem object.
The difference between calling the ListBox method and using a select element is that the ListBox method is designed to make it easy to bind to view data or model data.