title: Set values in jquery multiselect dropdown
body: <p>I want to set the multiple <code>ITEMS</code> in <code>jQuery multiselect dropdown</code> depending on the <code>VALUE</code> of that item, which I'm getting from database, separated by "<code>,</code>".</p>
  
  <p>I'm saving this fetched data in <code>hidden field</code>.</p>
  
  <p>Ex. </p>
  
  <p>Hidden field: <code>hdnLots = 64,65</code>
  , Items for lot No.: <code>64 = Lot 1, 65 = Lot2</code></p>
  
  <p>So when I get the <code>hdnLot=65</code>, then in <code>jQuery Multiselect dropdown</code> only <code>Lot2</code> needed to be selected. <strong>And same for 64,65. i.e. When multiple values are selected than all those values needed to seleted.</strong></p>
  
  <p>I've tried: <a href="https://stackoverflow.com/questions/6966260/jquery-multiselect-set-a-value-as-selected-in-the-multiselect-dropdown">JQuery multiselect - Set a value as selected in the multiselect dropdown</a></p>
  
  <p>Code I've wrote for this is:</p>
  
  <pre><code>if ($("#&lt;%= btnUpdateProject.ClientId %&gt;").css('display') == "inline-block") 
  {
     debugger;
     var dataarray = document.getElementById('&lt;%= hdnLots.ClientId %&gt;').value.split(",");
     $("#&lt;%= ddlNoOfLots.clientid %&gt;").val(dataarray);
  }
  </code></pre>