var ShiftNames = (from n in DataContext.AtdShifts select new { n.ShiftId, n.ShiftName }).Distinct(); ViewData["ShiftId"] = new SelectList(ShiftNames, "ShiftId", "ShiftName");
<label id="lblShift" class="editEmp_label">Shift</label> @Html.DropDownList("ShiftId", "Select Shift")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)