title: C# HTML table not in correct output format
body: <p>I am forming a <code>HTML</code> table to a string format to be parsed back to another function to be displayed in an email. </p>
  
  <p>However, I feel like I am missing out on a lot of things as I am unable to get the table to be in the correct output.</p>
  
  <p>Below is my code snippet:</p>
  
  <pre><code>var table = new HtmlTable();
  var mailMessage = new StringBuilder();
  string html;
  
  HtmlTableRow row;
  HtmlTableCell cell;
  
  row = new HtmlTableRow();
  
  row.Cells.Add(new HtmlTableCell { InnerText = "First Name" });
  row.Cells.Add(new HtmlTableCell { InnerText = "Last Name" });
  row.Cells.Add(new HtmlTableCell { InnerText = "Age" });
  
  table.Rows.Add(row); //seems to not adding a new row at this statement
  
  row.Cells.Add(new HtmlTableCell { InnerText = "Jane" });
  row.Cells.Add(new HtmlTableCell { InnerText = "Doe" });
  row.Cells.Add(new HtmlTableCell { InnerText = "29" });
  
  using (var sw = new StringWriter()){
      table.RenderControl(new HtmlTextWriter(sw));
      html = sw.ToString();
  }
  
  mailMessage.AppendFormat(html);
  Console.WriteLine(mailMessage.ToString());
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;table&gt;
          &lt;tr&gt;
                  &lt;td&gt;First Name&lt;/td&gt;
                  &lt;td&gt;Last Name&lt;/td&gt;
                  &lt;td&gt;Age&lt;/td&gt;
                  &lt;td&gt;Jane&lt;/td&gt;
                  &lt;td&gt;Doe&lt;/td&gt;
                  &lt;td&gt;29&lt;/td&gt;
          &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>