I need to display reviews, (on some pages there are only one review is displayed, some pages there are more).
I get a List from the data access layer.
Now for testing purpose I just use Controls.Add and add literals from the ascx.cs file, but I know there should be a better solution.
Maybe I should create a holder control (reviews.ascx) and dynamically load review.ascx in the foreach loop (review.ascx.cs will populate the needed elements in the review.asxc file). The problem is that I need to pass a parameter (reviewID) for the review.ascx.cs. I found something:
http://geekswithblogs.net/shahed/archive/2006/03/23/73096.aspx
I tried to make the Loadcontrol to pass a parameter, but I couldn't get it work. Where should I place the loadcontrol function? I have a masterpage and two asp files that will containt my reviews.ascx control.
private UserControl LoadControl(string UserControlPath, para ...
Go to the complete details ...