Can someone please recommend a good way in ASP.NET 1.1 to dynamically create
a HTML table to display some results I have in local variables?
For example, I want my HTML output to look like this:
Magazines (table header)
avg price: 4.50
total sold: 200
left in stock: 130
Revenue
today: 2000
year to date: 4500
sale running: False
Please note a couple of things:
1) each table will have the same html styles, format, and fonts. However
the properties shown for each table (such as avg price, total sold, etc) are
different, as shown in that example.
2) this data is not coming from a database or record set. Rather, I have
each value in its own local variable from the results of other business
logic. For example I have the following variables:
varAvgPrice = 4.50
varTotalSold=200
varInStock=130
varToday=2000
varYearToDate=4500
varSaleRunning=False
Now I could just hard code a table like this
<td>avg price</td> <td> <% = varAvgPrice %> </td>
but I have a few hundred results to display.
So instead I would rather create some sort of routine or use some sort of
control where I can pass it the header to use for the table, a list of the
tables properties and values to display for each table property. What are
some good ways to go about this?
Thanks,
Steve