I'm trying to update a database driven program to MVC5. My current hurtle is a simple selection list. I have it printing out values and taking data just fine, but it needs to default to the currently stored value when the user opens the modal it is contained in.
View code snippet:
<select ng-model="DbReferenceId">
@foreach (var item in (ViewData["ReferenceData"] as List<Reference>))
{
<option value="@item.Id">@Html.DisplayFor(modelItem => item.IdDisplay)</option>
}
</select>
So we're all on the same page, DbReferenceId is the current value of Reference, and item.Id/IdDisplay point to possible options for Reference from another table.
So, what's a quick and dirty way I can get this working?