array object to dropdown list in razor page code example
Example: generate a dropdown list from array data using razor .net mvc
@Html.DropDownList("myList", ViewBag.myList as SelectList)
@Html.DropDownList("myList", ViewBag.myList as SelectList)