I’m trying to develop a shopping cart for a website for a class project.
Initially, I had a webpage query a DB for all the appropriate products, then I created a loop that’d parse out those results, and store a label’s text to be the HTML for the thumbnails in a table. I tried adding a “Add To Cart” button to this loop and it wasn’t working, then I quickly learned this is completely the wrong way to go about this problem.
I was directed towards the Repeater control to just repeat a row of products and the button, but I can’t make much sense of any of the examples I’ve seen online.
Could someone try to explain how I’d use the Repeater to print out different buttons and images in a table?
Thanks. Oh, and this is C# / .NET 4.0
I’m gonna have to guess as some of the field names in your data, but hopefully you can follow this: