title: ASP.NET Core POST to Controller with a single element from View's List model
body: <p>I have a View whose model is a List of custom types and I want to POST changes  for only a single element of the List (model[i]). This POST itself works, except the value is what was originally in the model and not the updated value from the input</p>
  
  <p>View's Model Declaration</p>
  
  <pre><code>@model List&lt;Translation2&gt;
  </code></pre>
  
  <p>Translation2's type (F#)</p>
  
  <pre><code>type Translation2 = {
      Key: string;
      RowKey: string;
      Value: string;
      English: string;
  }
  </code></pre>
  
  <p>The View with a single entity submit</p>
  
  <pre><code>@model List&lt;Translation2&gt;
  
  &lt;form asp-controller="Home" asp-action="Translate" method="POST" &gt;
  &lt;table&gt;
      &lt;thead&gt;
          &lt;th&gt;
              &lt;h2&gt;Key&lt;/h2&gt;
          &lt;/th&gt;
          &lt;th&gt;
              &lt;h2&gt;English&lt;/h2&gt;
          &lt;/th&gt;
          &lt;th&gt;
              &lt;h2&gt;Translated&lt;/h2&gt;
          &lt;/th&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  @for(var i = 0; i &lt; Model.Count(); i++)
  {
          &lt;tr&gt;
              &lt;div&gt;
                  &lt;td class="key-col"&gt;
                      &lt;p style="font-size:large"&gt;@Model[i].Key&lt;/p&gt;
                      @Html.HiddenFor(m =&gt; m[i].RowKey)
                  &lt;/td&gt;
                  &lt;td class="val-col"&gt;
                      &lt;input class="fill-void" type="text" asp-for="@Model[i].English" readonly /&gt;
  
                  &lt;/td&gt;
                  &lt;td class="val-col"&gt;
                      &lt;input class="fill-void" type="text" asp-for="@Model[i].Value" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;a href="@Url.Action("Translate", "Home", new {RowKey=@Model[i].RowKey, Key=@Model[i].Key, Value=@Model[i].Value })" &gt;Save Translation&lt;/a&gt;
                  &lt;/td&gt;
              &lt;/div&gt;
          &lt;/tr&gt;
  }
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have also tried to just POST the entire list per
  <a href="https://stackoverflow.com/questions/38375998/asp-net-core-1-0-post-ienumerablet-to-controller">ASP.NET Core 1.0 POST IEnumerable&lt;T&gt; to controller</a>
  but will get </p>
  
  <pre><code>ArgumentNullException: Value cannot be null.
   Parameter name: source
  
  Count
  
  MoveNext in Translate.cshtml
  
  @for(var i = 0; i &lt; Model.Count(); i++)
  </code></pre>
  
  <p>The View with submitting the entire list</p>
  
  <pre><code>@model List&lt;Translation2&gt;
  
  &lt;form asp-controller="Home" asp-action="Translate" method="POST" &gt;
  &lt;table&gt;
      &lt;thead&gt;
          &lt;th&gt;
              &lt;h2&gt;Key&lt;/h2&gt;
          &lt;/th&gt;
          &lt;th&gt;
              &lt;h2&gt;English&lt;/h2&gt;
          &lt;/th&gt;
          &lt;th&gt;
              &lt;h2&gt;Translated&lt;/h2&gt;
          &lt;/th&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  @for(var i = 0; i &lt; Model.Count(); i++)
  {
          &lt;tr&gt;
              &lt;div&gt;
                  &lt;td class="key-col"&gt;
                      &lt;p style="font-size:large"&gt;@Model[i].Key&lt;/p&gt;
                      @Html.HiddenFor(m =&gt; m[i].RowKey)
                  &lt;/td&gt;
                  &lt;td class="val-col"&gt;
                      &lt;input class="fill-void" type="text" asp-for="@Model[i].English" readonly /&gt;
  
                  &lt;/td&gt;
                  &lt;td class="val-col"&gt;
                      &lt;input class="fill-void" type="text" asp-for="@Model[i].Value" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;button type="submit"&gt;Save Translation&lt;/button&gt;
  
                  &lt;/td&gt;
              &lt;/div&gt;
          &lt;/tr&gt;
  }
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I would really like to know how to solve both ways, if possible, but a solution for either will do at this point.</p>