0
I have this select field, where I upload the database data:
<label asp-for="CategoriaID" class="col-md-2 control-label"></label>
<div class="col-md-6">
<select asp-for="CategoriaID" asp-items="@Model.CountryList" class="form-control"></select>
<span asp-validation-for="CategoriaID" class="text-danger"></span>
</div>
But the need for the user to be able to include directly in this field, would it be possible ? Because when checking in select, there may not be a category, so it could type, and include in the bank.
I believe it’s more of a design decision than a programming decision. You may have a "Include categories" button, or you may have an "Other" option in your Select... the solution will depend on how you intend to address the issue.
– Bruno Soares
@Brunosoares I wish he could have the option to type in select, by clicking enter, ask if he would like to include in the bank, and then include.
– Mariana
I get it, select itself is not possible natively, but there are bootstrap or jquery components that can help you. A simpler solution would actually be an "Other" option, which when selected displays a textbox for typing.
– Bruno Soares
@Brunosoares thought to do this then through a modal, and load again the select without refresh on the page.
– Mariana
It is a great exit, if you have knowledge of ajax necessary, recommend =)
– Bruno Soares
I did it that way, and with ajax, thank you.
– Mariana