title: Adding 'Select All' to Bootstrap Multiselect form/list
body: <p>I have a .NET web application with several views that allow for me to select from database tables.</p>
  
  <p>I'm using Bootstrap 4.3, and have the list generated, but I need to add a 'Select All' option so that you don't have to individually click all of the values. </p>
  
  <p>Here's the section of the .cshtml file in question:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
       &lt;label asp-for="Products" class="control-label"&gt;&lt;/label&gt;
       &lt;select asp-for="Products" class="form-control" asp-items="ViewBag.AllProducts" size="10"&gt;&lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>AllProducts is defined on one of my controllers and generates a list of products that is pulled from a model.</p>
  
  <p>Based on some similar answers I've read, I take it I need to write in a JS script to add on the 'Select All' option, but most of the examples I've seen deal with an option list that is defined here as opposed to with ViewBag. </p>
  
  <p>I tried something like this, but couldn't get it to work:</p>
  
  <pre><code>$(".multiselect", this.el).multiselect({
  includeSelectAllOption: true
  });
  </code></pre>
  
  <p>Any advice? Trying to see if I'm heading in the right direction.</p>