I created a Table with these headers. Now How do I use a WHILE LOOP and add empty rows dynamically on the page load. Like if I want 40 empty row with 3 cells each, How do I use a while loop and add rows?
ASP.NET C# Microsoft Visual Studio
TableRow tr = new TableRow();
TableCell tcel = new TableCell();
tcel.Text = "id";
tr.Cells.Add(tcel);
TableCell tcel1 = new TableCell();
tcel1.Text = "Work";
tr.Cells.Add(tcel1);
TableCell tcel2 = new TableCell();
tcel2.Text = "Email";
tr.Cells.Add(tcel2);
Table1.Rows.Add(tr);