'm new to programming and I’m facing a big problem. How to implement select2 for asp net framework core projects? Is it possible to use this select already loaded with the View.bag items? << select id = “dllEstados” class = “form-control” asp-for = “StateId” asp-items = “ViewBag.EstadoId” type = “text” placeholder = “Select State” aria-label = "Name user “aria-describedby =” basic-addon1 "> </ select>
I don’t know much about asp.net, but as long as the <option>
elements are rendered when the page is loaded (i.e. not pulled in after page load by JavaScript) then you can use Select2.