G
George Durzi
Consider this pseudo HTML from a web form
<asp:Table>
<asp:TableRow>
<asp:TableCell>
<asp:Table>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
How can I construct this on the server side? Assume that I start with an
empty asp:table control on my webform, as follows:
<asp:Table ID="tblViewWall" Runat="server"></asp:Table>
I've done the following:
TableRow trRow = new TableRow();
TableCell trCell = new TableCell();
trRow.Cells.Add(trCell);
// Now inside trCell, I want to add another table with 1 row, and two
cells
// I can't see how I would create another Table, and add it to a
TableCell
tblViewWall.Rows.Add(trRow);
<asp:Table>
<asp:TableRow>
<asp:TableCell>
<asp:Table>
<asp:TableRow>
<asp:TableCell></asp:TableCell>
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
How can I construct this on the server side? Assume that I start with an
empty asp:table control on my webform, as follows:
<asp:Table ID="tblViewWall" Runat="server"></asp:Table>
I've done the following:
TableRow trRow = new TableRow();
TableCell trCell = new TableCell();
trRow.Cells.Add(trCell);
// Now inside trCell, I want to add another table with 1 row, and two
cells
// I can't see how I would create another Table, and add it to a
TableCell
tblViewWall.Rows.Add(trRow);