In your aspx page, you could also use an asp:Literal control to define the location where you want table2 to appear.
i.e.
aspx:
<asp:literal id="litTable1" runat="server" xmlns:asp="#unknown" />
<table id="table1" ...="">
...
</table>
.cs:
...
StringBuilder strhtmlcontent = new StringBuilder();
litTable1.Text = strhtmlcontent;