title: How to send the selected values from list box using ajax
body: <p>I need to send the multiple selected data from list box using ajax in mvc. I get the selected data. I dont know how to send the data ajax to controller. My code is below:</p>
  
  <pre><code>var Students= [];
  
              var x = document.getElementById("ListBox");
              for (var i = 0; i &lt; x.options.length; i++) {
                  if (x.options[i].selected == true) {
                      Students.push(x.options[i].text)
                  }
              }
  
  
   $.ajax({
                  url: '',
                  type: 'POST',
                  data: { id:studenid, class: class,  Students: Students},
                  dataType: 'json',
                  success: function (data) {
  
                  }
              }); // id:studenid, class:classs values are send it properly how to add the students?
  </code></pre>