Now for this article first asp.net core 8 mvc application and add a model class file in this we will add the below code. Here we are going to define the properties.
 public class Employee
{
    public int Id { get; set; }
    public string Name { get; set; }
}
public class EmployeeModel
{
    public List<Employee> EmployeeList  { get; set; }
}  public List<Employee> EmployeeData()
{
    List<Employee> employeeModels = new List<Employee>() {
        new Employee{Id=1,Name="Pawan Singh" },
        new Employee{Id=2,Name="Rajan Singh" },
        new Employee{Id=3,Name="Golden Sah" },
        new Employee{Id=4,Name="Sahoo Datta" },
    };
    return employeeModels;
}  [HttpGet]
public IActionResult Index()
{
    EmployeeModel empModel = new EmployeeModel();
    empModel.EmployeeList = new List<Employee>();
    //Default value
    empModel.EmployeeList.Add(new Employee { Id = 0, Name = "Select Employee" });
    var empList = EmployeeData();
    foreach (var item in empList)
    {
        empModel.EmployeeList.Add(new Employee { Id = item.Id, Name = item.Name });
    }
    return View(empModel);
}
[HttpPost]
public IActionResult Index(EmployeeModel empModel)
{
    ViewBag.EmployeeId = empModel.EmployeeId;
    return View(empModel);
}
public List<Employee> EmployeeData()
{
    List<Employee> employeeModels = new List<Employee>() {
        new Employee{Id=1,Name="Pawan Singh" },
        new Employee{Id=2,Name="Rajan Singh" },
        new Employee{Id=3,Name="Golden Sah" },
        new Employee{Id=4,Name="Sahoo Datta" },
    };
    return employeeModels;
 }Now please check the above line written where i am adding the value at zero index. This value will be treated as the default value. After adding the collection, we will pass the model class object to View. 
In HttpPost method I have passed the selected Employee Id in the View. This value you can use in your code.  Now let's create the view and add the below code. 
Code to Bind DropDownList
 @model EmployeeModel
@{
    ViewData["Title"] = "Home Page";
}
@using (Html.BeginForm("Index", "Home", FormMethod.Post, new { @enctype = "multipart/form-data" }))
{
    <div style="font-weight:bold;">Select Empolyee:</div>
    <div>
        @Html.DropDownList("EmployeeId", new SelectList(Model.EmployeeList, "Id", "Name"), new { @class = "form-select" })
    </div>
    <br />
    <div><input type="submit" value="Submit" /></div>
    <div>Dropdown Selectd Value</div>
    <div style="color:brown;font-weight:bold;">
        @ViewBag.EmployeeId
    </div>
} Please check the highlighted part of the above code.  In this I have taken Html.DropdownList. In this I have taken the name of the control same as the property defined in the model class EmployeeModel. This we need to keep same because if we want to capture the user selected of dropdown list at controller end, we need to keep the control name, and the property of model class passed in the HtppPost method. 
Code to Bind DropDownListFor
 @model EmployeeModel
@{
    ViewData["Title"] = "Home Page";
}
@using (Html.BeginForm("Index", "Home", FormMethod.Post, new { @enctype = "multipart/form-data" }))
{
    <div style="font-weight:bold;">Select Empolyee:</div>
    <div>
        @Html.DropDownListFor(m=>m.EmployeeId,new SelectList(Model.EmployeeList, "Id", "Name"), new { @class = "form-select" })
    </div>
    <br />
    <div><input type="submit" value="Submit" /></div>
    <div>Dropdown Selectd Value</div>
    <div style="color:brown;font-weight:bold;">
        @ViewBag.EmployeeId
    </div>
} Now we have done let's run the code to check the output.
Now let's check what exactly happen at controller end. 
In above code you can see there are total of 5 element int the list.  This list we are passing to view. Now lets expand the dropdown control and check the output.



