I need to make a comparison table in HTML format, the problem is that the items
in database comes as a columns but in comparison table it must be a rows!
Example
The data in database looks like the following
ID Name Color Weight
-------------------------------
1 Ball Red 10
2 Table Black 50
3 Chair Green 30
And it must looks like the following in comparison table
ID 1 2 3
Name Ball Table Chair
Color Red Black Green
Weight 10 50 30
I am using ASP.NET with repeater but it didn’t work,
Can you please help me to find the best way to do this.
I must use something like repeater because the numbers of columns in the the comparison table varies.
A possible solution:
Given the following DataTable as datasource:
And some ASP code for looping and building the table: