Relative Content

Tag Archive for javascripthtmljqueryasp.net-mvc

Select2 does not show my selected data on the screen

I’m stuck on a problem and I was wondering if you could help me.
I have an ASP .NET MVC system, and I have a widget screen with the function of editing a widget.
The call to edit a widget is in a PartialView, I can bring up all the fields filled in by the user, but in my select id=garagens-sel which I use select2, I have an array with 3 garages, but I can’t show it these 3 garages in my select2 box selected. I’ve tried several things but I still can’t show these garages on the screen. But if I look at the inspect element in the browser, I can see the 3 garages with their ids in the value and with the selected property applied.