title: Use Bootstrap-select with MVC Dropdown List
body: <p>I am attempting to use <a href="http://silviomoreto.github.io/bootstrap-select/" rel="nofollow noreferrer">Bootstrap-Select</a> in a Web Application I am developing in MVC to style a dropdown list for like a bootstrap dropdown as the rest of my Application is using bootstrap.  I have a Car Manufacturers dropdown in my Layout page which calls a Html.Action to go do a controller and builds the list of manufacturers from a Table in my DB and returns the Partial View Below: - note on clicking on one of the values in Dropdown form is submitted and User is navigated to next screen.</p>
  
  <pre><code>&lt;script type="text/javascript" src="~/Scripts/bootstrap-select.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="~/Content/bootstrap-select.css"/&gt;
  &lt;script type="text/javascript"&gt;
  
      $(document).ready(function() {
  
          $('.selectpicker').selectpicker();
  
          $('#carManufacturers').change(function () {
              $(this).closest('form').submit();
          });
  
      });
  &lt;/script&gt;
  
  @using (Html.BeginForm("Index", "Cars", FormMethod.Post))
  {
      @Html.DropDownListFor(model =&gt; model.SelectedCarManufacturer, Model.CarManufacturersList, "Select Car Manufacturer", new { id = "carManufacturers", @class = "selectpicker" })
  }
  </code></pre>
  
  <p>This is mostly working in that the Dropdown seems to be styled in bootstrap - one thing I am not sure of is how to add the <code>data-style="btn-inverse"</code> attribute to my dropdown - attempted to add a comma after the @class="selectpicker' and define it but it did not work.</p>
  
  <p>Also for some reason intellisense underlines selectpicker and states 'unknown css style selectpicker'?</p>
  
  <p>Also when rendering the dropdown is looking like below - how can I get rid off the second Select Car Manufacturer Text which is getting added?
  <img src="https://i.stack.imgur.com/kSL9y.png" alt="enter image description here"></p>