<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
dim rows,cells,j,i
rows=3
cells=2
For j=0 To rows-1
   dim r As New TableRow()
   For i=0 To cells-1
     dim c As New TableCell()
     c.Controls.Add(New LiteralControl("row " & j & ", cell " & i))
     r.Cells.Add(c)
   Next
   Table1.Rows.Add(r)
Next
End Sub
</script>


<html>
<body>

<form runat="server">
<asp:Table id="Table1" BorderWidth="1" GridLines="Both" runat="server" />
</form>

</body>
</html>