title: List item inside model always null on post - Asp.net MVC
body: <p>I am trying to post model which contains <strong>List&lt;></strong> item looks like below:</p>
  
  <pre><code>public class AddSubscriptionPlanModel
  {
      public AddSubscriptionPlanModel()
      {
          AllFeatures = new List&lt;Feature&gt;();
      }
      public int Id { get; set; }
      public int SubscriptionPlanId { get; set; }
      public int SubscriptionId { get; set; }
      public string Name { get; set; }
      public bool IsActive { get; set; }
      [Display(Name = "No Of Users")]
      public int? NoOfUsers { get; set; }
      [Display(Name = "Duration Type")]
      public DurationType DurationType { get; set; }
      public int Duration { get; set; }
      public decimal Amount { get; set; }
      public int SubscriptionPlanTrailId { get; set; }
      public int FeatureId { get; set; }
      public DateTime CreatedDateUtc { get; set; }
      public DateTime LastUpdatedUtc { get; set; }
      public int CreatedBy { get; set; }
      public int LastUpdatedBy { get; set; }    
      public List&lt;Feature&gt; AllFeatures { get; set; }
  }
  </code></pre>
  
  <p>I am populating all required fields on get method and feeding List from database</p>
  
  <pre><code>public ActionResult Mapping(int id)
  {        
      var features = FeatureManager.GetAllFeatures();
      var model = new Ejyle.DevAccelerate.Web.App.Models.SubscriptionPlan.AddSubscriptionPlanModel();
  
      model.AllFeatures = features;
      model.Id = id;
      model.SubscriptionId = id;
      model.NoOfUsers = 20;
      model.SubscriptionPlanId = 1;
      model.SubscriptionPlanTrailId = 1;
      model.Amount = 1000;
      model.CreatedBy = 1;
      model.LastUpdatedBy = 1;
      model.FeatureId = 1;
      model.Duration = 20;
  
      return View(model);
  }
  </code></pre>
  
  <p>And my view code looks like below :</p>
  
  <pre><code>@using (Html.BeginForm("Mapping", "SubscriptionPlans", FormMethod.Post))
  {
      @Html.HiddenFor(model =&gt; model.Id)
      @Html.HiddenFor(model =&gt; model.Amount)
      @Html.HiddenFor(model =&gt; model.Duration)
      @Html.HiddenFor(model =&gt; model.FeatureId)
      @Html.HiddenFor(model =&gt; model.CreatedBy)
      @Html.HiddenFor(model =&gt; model.LastUpdatedBy)
      @Html.HiddenFor(model =&gt; model.NoOfUsers)
      @Html.HiddenFor(model =&gt; model.SubscriptionId)
      @Html.HiddenFor(model =&gt; model.SubscriptionPlanId)
      @Html.HiddenFor(model =&gt; model.SubscriptionPlanTrailId)
      @Html.HiddenFor(model =&gt; model.AllFeatures)
      &lt;table class="table table-striped"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      @Html.DisplayNameFor(model =&gt; model.Name)
                  &lt;/th&gt;
                  &lt;th&gt;
                      @Html.DisplayNameFor(model =&gt; model.IsActive)
                  &lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              @for (int i=0; i &lt; Model.AllFeatures.Count; i++)
              {
                  &lt;tr&gt;
                      @Html.HiddenFor(model =&gt; model.AllFeatures[i].Id)
                      @Html.HiddenFor(model =&gt; model.AllFeatures[i].Name)
                      @Html.HiddenFor(model =&gt; model.AllFeatures[i].IsActive)
                      &lt;td&gt;
                          @Html.TextBoxFor(model =&gt; model.AllFeatures[i].Id)
                      &lt;/td&gt;
                      &lt;td&gt;
                          @Html.TextBoxFor(model =&gt; model.AllFeatures[i].Name)
                      &lt;/td&gt;
                      &lt;td&gt;
                          @Html.EditorFor(model =&gt; model.AllFeatures[i].IsActive)
                      &lt;/td&gt;
                  &lt;/tr&gt;
              }
          &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;input type="submit" class="btn btn-success" value="Submit" name="Submit"/&gt;
  }
  </code></pre>
  
  <p>On View, the list items rendered properly and even I am able to edit those fields.<br/>
  But On post, all properties have the value except <strong>AllFeatures</strong> list item property which always shows count = 0.</p>
  
  <p>Edit 1: This is how my view looks like while rendering features</p>
  
  <p><a href="https://i.stack.imgur.com/yy3nB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yy3nB.png" alt="enter image description here"></a></p>
  
  <p>Edit 2:</p>
  
  <p>Signature of the method posting to:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Mapping(AddSubscriptionPlanModel model)
  {       
  }
  </code></pre>