dropdownlistfor in mvc 5 razor example
Example 1: drop down list mvc5
@Html.DropDownList("MySkills", (IEnumerable
<SelectListItem>)ViewBag.MySkills)
Example 2: razor dropdownlistfor
@using MyMVCApp.Models
@model Student
@Html.DropDownListFor(m => m.StudentGender,
new SelectList(Enum.GetValues(typeof(Gender))),
"Select Gender")