What does the rendered table need to do?
If the answer is "it needs to contain "stuff" that the user will click/change, and then more server code will run", then you need to "Render dynamic controls", and should use a server side control to do that. Repeater. DataList. DataGrid.
If the answer is "sit there and look pretty", then you simply output a good old fashioned HTML Table, by using the LiteralControl.
The idea is: drag a PlaceHolder where you want the table to be.
Build a query, run the query, return a SqlDataReader.
Start your table:
PlaceHolder1.Controls.Add(new LiteralControl("<table>"));
Read through your datareader, outputting tags and content as you go:
[PHP]while(myDataReader.Read())
{
PlaceHolder1.Controls.Add(new LiteralControl("<tr><td>" + myDataReader["myField"].ToString() + "</td></tr>"));
}[/PHP]
And so on.
Reputation Points: 227
Solved Threads: 37
Made Her Cry
Offline 1,697 posts
since Dec 2004