title: razor pages, asp.net: retrieve value from bound textfield
body: <p>I created this formfield with a textbox at the bottom:</p>
  <pre><code>                        &lt;div class=&quot;divFormField&quot;&gt;
                              &lt;table cellspacing=&quot;&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;
                                  &lt;tr&gt;
                                      &lt;td class=&quot;Label&quot;&gt;
                                          &lt;label for=&quot;position&quot;&gt;Sprachen (INFO: Wenn nichts ausgewählt, automatisch &quot;alle&quot; (Wegen Backwardscomp.) Neue Tabelle mit einer Zeile pro Auswahl wenn spezifitiert.)&lt;/label&gt;
                                      &lt;/td&gt;
                                      &lt;td class=&quot;Field&quot;&gt;
                                          &lt;table&gt;
                                              @for (int i = 0; i &lt; Model.Item.CheckedLanguages.Count; i++)
                                              {
                                                  &lt;tr&gt;
                                                      &lt;td&gt;
                                                          @Html.HiddenFor(m =&gt; m.Item.CheckedLanguages[i].Name)
                                                          @Html.CheckBoxFor(m =&gt; m.Item.CheckedLanguages[i].isChecked)
                                                          &lt;label&gt;@Model.Item.CheckedLanguages[i].Name&lt;/label&gt;
                                                          &lt;div class=&quot;input-control text&quot;&gt;
                                                              @Html.TextBoxFor(m =&gt; m.Item.CheckedLanguages[i].Test)
                                                          &lt;/div&gt;
                                                      &lt;/td&gt;
                                                  &lt;/tr&gt;
                                              }
                                          &lt;/table&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
                          &lt;/div&gt;
  </code></pre>
  <p>This is a child of this formfield:</p>
  <pre><code>&lt;form action=&quot;@Url.Action(&quot;SaveEdit&quot;)&quot; method=&quot;POST&quot; id=&quot;idForm&quot;&gt;
      @Html.HiddenFor(m =&gt; m.AutoCloseWindow)
      @Html.HiddenFor(m =&gt; m.Item.Id)
  </code></pre>
  <p>My Model is very simple:</p>
  <pre><code>public class CheckedLangs
  {
      public string Name { get; set; }
  
      public string Test { get; set; }
      public int Id { get; set; }
      public bool isChecked { get; set; } = false;
  }
  </code></pre>
  <p>I can see the input fields being rendered with the correct values I put onto my model beforehand. Now I just want to click save and retrieve the new entries on my model, but this is the result:</p>
  <p><a href="https://i.stack.imgur.com/izpqk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/izpqk.png" alt="enter image description here" /></a></p>
  <p>I did deffinatley put stuff into the textbox:</p>
  <p><a href="https://i.stack.imgur.com/W6GCs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W6GCs.png" alt="enter image description here" /></a></p>
  <p>I just wrote &quot;asd&quot;.</p>
  <p>I was expecting to see &quot;asd&quot; being shown inside my variables now, but as you can see in the first picture, I am being returned null. (the default value). It is never overridden. I could put default values onto my model and they would show up here, but when I click save, the default values are still there and not what I typed into the input field.</p>
  <p>Where am I missing the connection?</p>
  <p>Thank you!</p>
  <p>EDIT:</p>
  <p>I have noticed that if my object is not from a list but say just a property, the binding works correclty...</p>