razor page dropdownlist code example
Example 1: how to creat dropdownlist in razor page using select list item
@Html.DropDownList("ReportType", new List{
new SelectListItem { Text = "Summary", Value = "summary" },
new SelectListItem { Text = "Detail", Value = "detail" }
}, "Select Report Type", new { @class = "form-control", @required = "required" })
Example 2: class selector to property in asp net core dropdown