title: Html.BeginForm() not passing the model
body: <p>I have the following cshtml form:</p>
  
  <pre><code>model Scraper.Facade.PlayerRow
  
  @using (Html.BeginForm("Calculate", "Home", FormMethod.Post))
  {
  &lt;table class="table table-striped table-bordered table-condensed table-responsive table-hover"&gt;
      @foreach (var player in Model.AttribsPlayerLine)
      {
          &lt;thead&gt;
              &lt;tr class="success"&gt;
                  @foreach (var attrib in player.AttribsPlayerList)
                  {
                      //@Html.DisplayNameFor(x =&gt; Model.tytul)
                      &lt;th data-field="@attrib.attribName"&gt;@Html.DisplayFor(x =&gt; attrib.attribName) &lt;/th&gt;
                  }
              &lt;/tr&gt;
              &lt;tr class="active"&gt;
                  @foreach (var attrib in player.AttribsPlayerList)
                  {
                      &lt;td data-field="@attrib.attribValue"&gt;@Html.TextBoxFor(x =&gt; attrib.attribValue)&lt;/td&gt;
                  }
              &lt;/tr&gt;
          &lt;/thead&gt;
  
      }
  &lt;/table&gt;
  
  &lt;input class="btn-danger"  type="submit" name="Next &gt;&gt;" value="Next &gt;&gt;" /&gt;
  }
  </code></pre>
  
  <p>which is displaying correctly and then I am trying to get the model in the following controller ActionResult</p>
  
  <pre><code>[HttpPost]
  public ActionResult Calculate(PlayerRow model)
  {
      GenericHelper _genericHelper = new GenericHelper();
      return View();
  }
  </code></pre>
  
  <p>However the PlayerRow model is always null.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>This is my model definition</p>
  
  <pre><code>public PlayerRow LoadHtmlDoc(string fileLocation)
  {
          List&lt;Attrib&gt; attribsHeaderList = new List&lt;Attrib&gt;();
          var playerRow = new PlayerRow();
          playerRow.AttribsPlayerLine = new List&lt;AttribLine&gt;();
  
          var htmlDoc = new HtmlDocument { OptionFixNestedTags = true };
  
          // There are various options, set as needed
  
          // filePath is a path to a file containing the html
          htmlDoc.Load(fileLocation);
  }
  
  public class PlayerRow
  {
      public List&lt;AttribLine&gt; AttribsPlayerLine; 
  
  }
  </code></pre>
  
  <hr>
  
  <p>UPDATE</p>
  
  <p>Hi All, I changed a bit the logic of my application, basically having 2 lists which has the Header Attributes, and the Attributes for all the players, so only 2 classes now, and I changed the cshtml like this, which is working now :-</p>
  
  <pre><code>@using (Html.BeginForm("Calculate", "Home", FormMethod.Post, new { enctype =        "multipart/form-data" }))
  {
  &lt;table class="table table-striped table-bordered table-condensed table-responsive table-hover"&gt;
      &lt;tr&gt;
          @for (int k = 0; k &lt; Model.HeaderAttributes.Count; k++)
          {
              &lt;td&gt;
                  @Html.DisplayFor(x =&gt; x.HeaderAttributes[k].AttributeName)
                  @Html.HiddenFor(x =&gt; x.HeaderAttributes[k].AttributeName)
              &lt;/td&gt;
          }
      &lt;/tr&gt;
  
  
      @for (int i = 0; i &lt; Model.PlayerList.Count; i++)
      {
          &lt;tr&gt;
              &lt;td&gt;
                  @Html.DisplayFor(x =&gt; x.PlayerList[i].PlayerName)
                  @Html.HiddenFor(x =&gt; x.PlayerList[i].PlayerName)
              &lt;/td&gt;
              @for (int j = 0; j &lt; Model.PlayerList[i].AttributesList.Count; j++)
              {
                  &lt;td&gt;
                      @Html.DisplayFor(x =&gt; x.PlayerList[i].AttributesList[j].AttributeValue)
                      @Html.HiddenFor(x =&gt; x.PlayerList[i].AttributesList[j].AttributeValue)
                  &lt;/td&gt;
              }
          &lt;/tr&gt;
      }
  
  &lt;/table&gt;
  
  
  &lt;input class="btn-danger" type="submit" name="Next &gt;&gt;" value="Next &gt;&gt;" /&gt;
  }
  </code></pre>
  
  <p>Now my problem is, who to award the Answer, since I can say that most of the Answers were really helpful to arrive to my solution</p>