Please consider the following line of code in an MVC5 EF6 project:
@Html.DropDownListFor(g => ssi[0].property1, new SelectList(dd, "value", "text"), ssi[0].property1)
The issue I have is that when the page loads, the correct selection is displayed in the drop down based on the model.property returned from the database. However, when saving using @Ajax.BeginForm, unless I change the value in the drop down which is not always required, the original value does not get saved. Instead a null is recorded and drop downs revert to unbound state in terms of their selected values.
My question is how do I ensure the original selected value loaded in the dropdown is saved back without touching the drop down?
Thanks