B
Bob
Hi,
In aspx file, i have a table:
<asp:Table ID="table1" runat="server">
</asp:Table>
In the code-behind, i create rows and cells:
For i = 0 To 50
r = New TableRow()
for j = 0 To 20
c(i, j) = New TableCell()
r.Cells.Add(c(i, j))
Next
Table1.Rows.Add(r)
Next
....
With this, the table is rendered perfectly (data are displayed in all rows
and cells).
Now i added this line just after 'r.Cells.Add(c(i, j))':
Controls.Add(c(i, j))
Now i have no table anymore: data are dispayed the one after the other in
the page.
My questions are:
1) where is my table, why is is gone?
2) what's the difference between 'Controls.Add(c(i,j))' and
r.Cells.Add(c(i, j)) in this case?
Thanks for help
Bob
In aspx file, i have a table:
<asp:Table ID="table1" runat="server">
</asp:Table>
In the code-behind, i create rows and cells:
For i = 0 To 50
r = New TableRow()
for j = 0 To 20
c(i, j) = New TableCell()
r.Cells.Add(c(i, j))
Next
Table1.Rows.Add(r)
Next
....
With this, the table is rendered perfectly (data are displayed in all rows
and cells).
Now i added this line just after 'r.Cells.Add(c(i, j))':
Controls.Add(c(i, j))
Now i have no table anymore: data are dispayed the one after the other in
the page.
My questions are:
1) where is my table, why is is gone?
2) what's the difference between 'Controls.Add(c(i,j))' and
r.Cells.Add(c(i, j)) in this case?
Thanks for help
Bob