title: Creating a dynamic table
body: <p>I'm working with C# to develop my skills. I am trying a tutorial that I have found online: <a href="http://geekswithblogs.net/dotNETvinz/archive/2009/03/17/dynamically-adding-textbox-control-to-aspnet-table.aspx" rel="nofollow noreferrer">http://geekswithblogs.net/dotNETvinz/archive/2009/03/17/dynamically-adding-textbox-control-to-aspnet-table.aspx</a> but when I try the code and add the Generate table method it tells me that the type or the namespace name for <code>Table table = new Table();</code> could not be found.. does anyone know what namespace I should use for this. This is the rest of the code:</p>
  
  <pre><code>  private void GenerateTable(int colsCount, int rowsCount)
          {
              //Creat the Table and Add it to the Page
              Table table = new Table();
              table.ID = "Table1";
              Page.Form.Controls.Add(table);
              // Now iterate through the table and add your controls 
              for (int i = 0; i &lt; rowsCount; i++)
              {
                  TableRow row = new TableRow();
                  for (int j = 0; j &lt; colsCount; j++)
                  {
                      TableCell cell = new TableCell();
                      TextBox tb = new TextBox();
  
                      // Set a unique ID for each TextBox added
                      tb.ID = "TextBoxRow_" + i + "Col_" + j;
  
                      // Add the control to the TableCell
                      cell.Controls.Add(tb);
                      // Add the TableCell to the TableRow
                      row.Cells.Add(cell);
                  }
                  // Add the TableRow to the Table
                  table.Rows.Add(row);
              }
          }
  </code></pre>
  
  <p>any help would be much appreciated thanks</p>