title: Pass a list of objects to MVC action method using AngularJS post
body: <p>I have an action method as given below:</p>
  
  <pre><code>[HttpPost]
      public ActionResult Ask(Question question)
      {
          if (ModelState.IsValid)
          {
              TempData["NewQuestion"] = question;
              return RedirectToAction("Submit");
          }
          return View(question);
      }
  </code></pre>
  
  <p>The <code>Question</code> class definition is given below:</p>
  
  <pre><code>public class Question    
  {
      public int Id { get; set; }
      public string Title { get; set; }
      public string Body { get; set; }
      public string UserId { get; set; }
      public List&lt;Tag&gt; Tags { get; set; }
      public int Votes { get; set; }
      public List&lt;Answer&gt; Answers { get; set; }
      public int Views { get; set; }
      public DateTime CreationDate { get; set; }
  }
  </code></pre>
  
  <p>The code which I have written to call the above given action method is as given below:</p>
  
  <pre><code>&lt;script&gt;
          function questionController($scope, $http) {            
              $scope.submit = function () {                
                  var data = $.param({
                      Title: $scope.title,
                      Body: $scope.body,
                      Tags: [$.param({ TagName: 'MVC' }), $.param({ TagName: 'WCF' })]
                  });
                  var config = {
                      headers: {
                          'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
                      }
                  };
                  $http.post('Ask', data, config)
                      .success(function (data, status, headers, config) {
                          $scope.PostDataResponse = data;
                      })
                      .error(function (data, status, header, config) {
                          alert(data);
                      });
                  };
          }
          var queApp = angular.module("queApp", []);
          queApp.controller("queCtrl", questionController);
      &lt;/script&gt;
  </code></pre>
  
  <p>The action method is being called but the <code>Tags</code> member which is a list is received as <code>null</code>. Please let me know what I am doing wrong.</p>