ASP.net: Creating an unbound 'list'?
Posted on 2003-11-12
I need to output a list of Days (in a month) to the screen, i.e. first time the page loads, I want to output all the days in November; 1-30 vertically, almost in a diary style. For each of these days that are output to the screen, I will perform a check to the database to see if there are any activities associated with this date, and output any found activities within this 'day cell'.
In Classic ASP I would have a simple FOR...NEXT loop to output each of the days in the month, and within that block, perform the database checks, however, I'm not sure how to do this kind of thing best in .NET as so far, all of my lists have been databound repeater controls, or datagrid controls. I did have a brief look at the methods of the DataList control but it looked like this needed a datasource bound to it also?
Any suggestions on how I should go about doing this task would be much appreciated.