Hopefully I can explain my problem clearly,
I have a fairly complex display (a scorecard) that is a web user control (containing many various type asp.net controls) on a page. It is populated by a custom data collection (an object I've named "TPD"). This works great to display one scorecard at a time. The problem is that I want to display multiple (a variable number) scorecards on a single page.
I've looked at repeater controls but my display (the scorecard) does not fit the conventional iterative controls (list control, datagrid etc) and I don't think that route would work for me anyway.
I have done similar in the past without using a web user control as follows:
- Loop through the data and each time through the loop append a string with standard html (no web user control, no asp.net controls) representing a scorecard.
- Assign the completed string to the text property of a literal control which renders it to the screen.
Another solution (that I find basically unworkable but might explain what I am trying to do!) is as follows:
- Put 50 (or some large number) instances of the web user control on the page and hidden.
- Then loop through the data and create x number of data objects (the "TPD's" I mentioned earlier)
- Populate and make visible as many of the web user controls as necessary.
This seems messy and inefficient to me! Am I missing something completely obvious here?
Any guidance would be appreciated.
Thanks in advanced!