I need to to edit some registries but i havent managed to fill the select with the associated options for each registry.
Im doing this in an MVC 5 project.
This is my ListBox:
<div>
@Html.ListBoxFor(x => x.Recursos.SelectedValues, (SelectList)ViewBag.ListaRecursos, new { @class = "form-control select2", @id = "test", @multiple = "multiple", @style="width: 100%", @Name = "nome"})
</div>
But i cant even fill it like this
$('#test').val('hi')