[Solved] DropdownList value is getting null in ASP.NET MVC
As you said in the comment that: after submitting the form companyId = null This is actually becuase your drop down select input field name is CompanyName instead of CompanyId So name it CompanyId as follows: <div class=”form-group”> <strong class=”strong”>Company Name</strong> <div class=”col-md-10″> @Html.DropDownList(“CompanyId”, (IEnumerable<SelectListItem>)ViewBag.CompanyName, “Select Company”, new { @class = “form-control” }) @Html.ValidationMessageFor(model => … Read more