title: How can I use a @Html.DropDownList with multiple values
body: <p>I have a table <code>Medicine</code> with column <code>ID</code>,<code>MedicineName</code> and <code>price</code></p>
  
  <p>Now I have this <code>@Html.DropDownList</code> populated by the table medicine. I want to include the value <code>ID</code>,<code>MedicineName</code> and <code>price</code> the call or use it in jquery.</p>
  
  <p>currently I can only get the <code>MedicineName</code></p>
  
  <p>My controller:</p>
  
  <pre><code> public ActionResult Create()
      {
          ViewBag.ClientID = new SelectList(db.Clients, "ClientID", "Surname");
          ViewBag.MedicineID = new SelectList(db.Medicines, "MedicineID", "MedicineName");
          return View();
      }
  </code></pre>
  
  <p>My view:</p>
  
  <pre><code> @Html.DropDownList("MedicineID", ViewBag.MedicineID, htmlAttributes: new { @class = "form-control" })
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code> $("#btnAdd").click(function () {
  
          var medname = $("#MedicineID option:selected").text()
          var qty = $("#myID").val()
  
          $("#tblList").append('&lt;tr&gt; &lt;td&gt;' +medname+ '&lt;/td&gt;  &lt;td&gt;'+qty+'&lt;/td&gt;  &lt;td&gt;   &lt;/td&gt;  &lt;td&gt;&lt;a class="remove" href="#"&gt;del&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;')
  
      })
  </code></pre>