here is an example,hope that helpprivate void Button1_Click(object sender, System.EventArgs e)
{
int rownum=System.Convert.ToInt16(TextBox1.Text);
int cellnum=System.Convert.ToInt16(TextBox2.Text);for(int i=1;i<=rownum;i++)
{
TableRow myTablerow=new TableRow();
for(int j=1;j<=cellnum;j++)
{
TableCell myTablecell=new TableCell();
myTablerow.Cells.Add(myTablecell);
}
Table1.Rows.Add(myTablerow);}
}