I use select
and it is populated from the database:
<select asp-for="CategoriaID" asp-items="@Model.CountryList" id="cbcategoria" class="form-control">
</select>
And here's how it's in the controller:
model.CountryList = new SelectList(countries, "Id", "Value");
I would like to know how I can leave the unfilled ones when inserting a new record? The field is required in the ViewModel.