Click here to Skip to main content
15,886,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
My View
@Html.ListBoxFor(model => model.PositionId, new MultiSelectList(Model.GetPostions, "PositionId", "PositionName",Model.PositionId))
@Html.ValidationMessageFor(model => model.PositionId)

My Controller

[HttpPost]
public ActionResult AddEmployee(EmployeeViewModel employeeViewModel)
{
//_employeeService.Insert(employeeViewModel);

return RedirectToAction("View", "Employee");
}

Now when I see PositionId in employeeViewModel,its Null..Please can I know anything wrong I made.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900