Skip to content
Loading
_employeeForm.cshtml
  1. @model WebApplication2.Models.Employee  
  2.   
  3. @Html.TextBoxFor(a => a.Name)  
  4. @Html.DropDownListFor(a => a.DepartmentId, (IEnumerable)ViewBag.department, "-- Select Department --")  
 
 
0
  • Mohammad Sbeeh
    -1
    Hi Jaykumar,
     
    this article may be help you,
     
    https://codingtips.net/2013/07/17/how-can-bind-a-dropdown-list-in-mvc-and-use-selected-value/  
    -1