I have 2 dropdownlists. The first contains names, the 2nd contains data pulled in from the database via a javascript function. This works fine.
All data from the form is saved except the 2nd dropdownlist. This dropdownlistfor is initially set to an empty list when the form is rendered since it depends on the selected value of another dropdownlist. Here is my 2nd dropdownlist that is not saving to the db:
@Html.DropDownListFor(model => model.file_ref, Enumerable.Empty<SelectListItem>(), "Select", new { @class = "form-control" })
Please can you advise what is wrong with this and why its value won't save to the DB?