title: Sending dynamically generated textbox values to C# Controller?
body: <p>So I have a table that works like this:
  <a href="https://gfycat.com/WeakBlueIslandwhistler" rel="nofollow">https://gfycat.com/WeakBlueIslandwhistler</a></p>
  
  <p>Generated by:</p>
  
  <pre><code>&lt;table class="table table-bordered table-with-button table-condensed " id="hidTable"&gt;
                              &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th&gt;HID #&lt;/th&gt;
                                  &lt;th&gt;Lines&lt;/th&gt;
                              &lt;/tr&gt;
                              &lt;/thead&gt;
                              @for (int j = 0; j &lt; 3; j++)
                              {
                                  &lt;tr&gt;
                                      &lt;td&gt;
                                          &lt;input class="form-control table-with-button" type="number" placeholder="HID" id="hid-@j"&gt;
                                      &lt;/td&gt;
                                      &lt;td&gt;
                                          &lt;input class="form-control table-with-button" type="number" placeholder="Lines" id="lines-@j"&gt;
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              }
   &lt;/table&gt;
  </code></pre>
  
  <p>New rows and textboxes are created by calling a javascript method. </p>
  
  <p>Essentially, there are an unknown number of pairs of text fields in this table, and the data pairs need to be passed to the controller... (I'm thinking storing it as an object in tempdata?) </p>
  
  <p>Each textbox has a unique id (hid-1, hid-2 hid-3 and lines-1, lines-2, lines-3 respectively) </p>
  
  <p>What is the best way to iterate over these textboxes, save their value (I can handle validation prior to saving) and then pass it to the backend?</p>