I have a loop in a razor that generates a pattern several times. Inside the template is a drop-down list
@Html.DropDownlistFor(x=>x.pasajero[i].option, Model.optionItems)
A drop-down list is displayed, but the option is selected="selected"not set.
I was able to correctly display the dropdown outside the loop using the same values. Any ideas why?
source
share