Unable to populate dropdonwlist with pre-selected value.Populating with pre-selected value works with viewbag method.However when i am trying the same with a Model based method i find no luck.
public ActionResult Edit(int?id)
{
Job_ClientVM Vm = new Job_ClientVM();
Vm.Job_Info = Get_jobdetails(id);
//4 is desired pre-selected ID value
Vm.Recruiters = new SelectList(db.Recruiter_Info.ToList(), "Id",
"Recruiter_Name",4);
}
Here is my View
@Html.DropDownListFor(Model => Model.SelectedRecruiterID, Model.Recruiters, "Assign Recruiter", new { @class = "form-control" })