title: Extracting Data out of a input box inside a table cell using C#
body: <p>I have some table that looks like this:</p>
  
  <pre><code>&lt;table width="650" id="myTable" runat="server"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" /&gt;&amp;nbsp;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now, I want to rip data out of that and store it in an XML file.  The problem is that the number of rows is unknown.  A user can create anywhere between 3 and n rows.  To solve this, I wrote a little loop that pulls data out of the table by row.</p>
  
  <pre><code>// Assume the relevant items are declared and assigned a proper value.
  
          while (i &lt; myTable.Rows.Count)
          {
              tRow = myTable.Rows[i];
  
              tNameNode.InnerText = tRow.Cells[0].InnerText;
              tUnitsNode.InnerText = tRow.Cells[1].InnerText;
              tValueNode.InnerText = tRow.Cells[2].InnerText;
  
              tNewEntryNode.AppendChild(tNameNode);
              tNewEntryNode.AppendChild(tUnitsNode);
              tNewEntryNode.AppendChild(tValueNode);
  
              tIntermediateNode.AppendChild(tNewEntryNode);
  
              i++;
          }
  </code></pre>
  
  <p>Now the problem with this that I realized only after I ran it is that it's not going to fetch what is inside the input box, just the actual input box code, which is not really what I want.</p>
  
  <p>How can I get the content inside the Input boxes?</p>