Home Bootstrap-select attributes in Razor/.Net Core

# Bootstrap-select attributes in Razor/.Net Core

Winthorpe
1#
Winthorpe Published in 2018-02-11 13:05:45Z
 I'm having trouble applying bootstrap-select attributes for drop down list form inputs in my .NET Core project. In particular I would like to apply the live search attribute. 1 - I have tried the following code. It is in a Razor page, and the '_' syntax is advised here. This successfully applies the Bootstrap style (see screenshot) but not the additional attributes:  @Html.DropDownListFor(m => m.Observation.BirdId, new SelectList(Model.Birds, "BirdId", "EnglishName"), new { @class = "form-control selectpicker", data_width = "auto", data_live_search = "true", //data_show_subtext = "true", })  Here's the screenshot. It shows the Bootstrap style was successfully applied, but not the live search feature. This list will eventually contain ~600 options so a search feature is required. 2 - I have also tried applying the following code - in a blank Razor page - lifted directly from the bootstrap-select documentation. The result is the same: it applies the Bootstrap style but not the live search functionality. Or indeed any other attribute that I have tried:   I have tried all sorts over the last couple of days. Does anyone have any suggestions? Thank you.
Winthorpe
2#
 I got to the bottom of the problem. I had the NuGet package installed. I uninstalled the NuGet package. Then I added the dependencies via the links:   The various ways of installing the required dependencies are explained in the bootstrap-select documentation. I had previously attempted to add the dependencies via the links. However, I think it had conflicted with the already installed NuGet dependencies.