Can you help me?
I have a table in my database like this:
| January | February |
|---|---|
| 100.000 | 200.000 |
and I want to show that data like this using a repeater:
| January | 100.000 |
|---|---|
| February | 200.000 |
Please help me, so that the display in my ASP.NET frontend can appear like that; I use VB.NET.
Ok, since we talking about a table of data?
Then using a repeater really not the correct type of "repeating" control.
So, a repeater for each data row would be say good for this type of repeat:
Or say maybe like this:
In other words, it not for a table like layout.
For a table like layout, I suggest using a gridview - it much better for this purpose.
So, we can drop in a gridview - I used the wizards to create this - then a delete the data source from the page. Regardless, we have this now:
So, now we need to de-normalize your VERY bad data. That data looks like a spredsheet - and it not really very good for "data" or a "data driven approach.
So, lets write this code behind to load up the data.
And now our ouput looks like this:
our data table looks like this:
So, that database needs some love and care - it should not be setup that way (with each column as a month. The database should be: