title: asp.net mvc jquery posting multiple hidden fields
body: <p>i have this list of hidden fields</p>
  
  <pre><code>   &lt;input type="hidden" value="1" id="serviceslist" name="serviceslist" /&gt;
     &lt;input type="hidden" value="2" id="serviceslist" name="serviceslist" /&gt;
     &lt;input type="hidden" value="3" id="serviceslist" name="serviceslist" /&gt;
  </code></pre>
  
  <p>i have add more button which when clicked want to sent the serviceslist to mvc controller. basically i think that i need to send the list as array. how can i do it?</p>
  
  <pre><code>  $('#addmoreservices').click(function () {          
       var serviceslist= $("#serviceslist").val()
          $.ajax({
              url: url,
              data: { serviceslist: serviceslist },
              cache: false,
              dataType: "json",
              traditional: true,
              type: "POST",
              success: function (data) {
  
                  alert("dddd");
              },
              error: function (reponse) {
                  alert("error : " + reponse);
              }
          });
      });
  </code></pre>
  
  <p>this is my mvc controller </p>
  
  <pre><code> [HttpPost]
      public ActionResult AddmoreServices(List&lt;int&gt; serviceslist)
      {
  
          return View();
      }
  </code></pre>