title: MVC 3 AJAX Post, List filled with Objects, but Objects Properties are Empty
body: <p>I have the following problem:</p>
  
  <p>On a Button-Click I POST some data to the server.
  My controller Action looks like this:</p>
  
  <pre><code>public ActionResult Accept(List&lt;MyViewModel&gt; entries)
  {
      //here entries HAS 2 MyViewModel-Instances in it.
      //The entries are not null, but the values of the instances are!
      //entries[0].ParamA is null
  }
  </code></pre>
  
  <p>Where the MyViewModel looks like this:</p>
  
  <pre><code>public class MyViewModel
  {
      public string ParamA { get; set; }
      public string ParamB { get; set; }
  }
  </code></pre>
  
  <p>And the AJAX-Call is the follwing:</p>
  
  <pre><code>var myEntries = { entries: [{ ParamA: "A", ParamB: "B" }, { ParamA: "C", ParamB: "D" }] };
  
  $.ajax({
      type: 'POST',
      url: url,
      cache: false,
      data: myEntries,
      dataType: 'text' });
  </code></pre>
  
  <p><strong>What i already tried to do:</strong></p>
  
  <ul>
  <li>Changed dataType to 'json'</li>
  <li>used: traditional: true</li>
  <li>tried var myEntries = JSON.stringify(...);</li>
  <li>tried var myEntries = { entries : [JSON.stringify({ ... }), JSON.stringify({ ... })] };</li>
  <li>same as above, but with jQuery.param(..., true);</li>
  <li>Use of IEnumerable or MyViewModel[] instead of list.</li>
  <li>ANY combination of the above</li>
  </ul>
  
  <p>What am I doing wrong here?</p>
  
  <p>Thank you very, very much in advance for helping me!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My (Razor)View is not interesting at this moment as it has nothing to do with anything. I am NOT using any of the HTML.TextBoxFor (or similiar) Methods to fill the myEntries-Variable. It is actually filled dynamically (because there are many many conditions).
  For the sake of the question (and my own testing) i hard-coded the variable. :)</p>