I want to assign some ID attribute name to my Dropdown list which is using data from the ViewBag as,
ViewBag.Group = new SelectList(group, \"GroupId\", \"Nam
Try it:
In controller
ViewBag.EmployeeId = new SelectList(db.tb_employees, "id", "last_name");
In View
@Html.DropDownList("EmployeeId", (IEnumerable)ViewBag.EmployeeId,"Show All", new { @class = "form-control" })