A <select> form control lets users choose from a list of options, such as a currency to convert. In Razor, the Select Tag Helper connects the control to PageModel properties for its options and selected value. section 18.2.4
Choose the form that fits the interaction:
- Use a standard dropdown for one selection, a list box with the size attribute to show several options, or an IEnumerable-bound property for multiple selections. section 18.2.4
- Supply options as SelectListItem values through asp-items, and bind the selected value with asp-for. Add a blank option when you do not want an item selected by default. section 18.2.4
Render a dropdown
Set Model.Items to a list of SelectListItem options, then use <select asp-for="Input.SelectedValue1" asp-items="Model.Items"></select> in Razor. section 18.2.4
Compare dropdowns, list boxes, multiselect controls, and grouped options. section 18.2.4









