title: How to pass string array to controller using ajax?
body: <pre><code>// something defined deleteArr and pass values to it
  var postData = { deleteArr: deleteArr };
  if(deleteArr.length &gt; 0)
      {
          $.ajax({
              url: "@Url.Action("Delete", "ASZ01")",
              type: "POST",
              data: postData,
              contentType: "application/json; charset=utf-8",
              success: function (response) {
                  alert("success.");
              },
              error: function (response) {
                  alert(deleteArr[0]);
              }
          });
          deleteArr.length = 0;
      }
  </code></pre>
  
  <p>The above code is javascript.
  Until $.ajax begin I can confirm that values in array is correct in immediate window,but when it comes to error: I got "undefined".
  And the following is my function in controller</p>
  
  <pre><code>public void Delete(List&lt;string&gt; deleteArr)
      {
          service.Delete(deleteArr);
      }
  </code></pre>
  
  <p>The second question is that I set breakpoint on that function but it can't stop.
  I think maybe my ajax form is wrong?</p>