1

I am building a website that has a similar page to groupon's browse deal page(www.groupon.com).

there is a div tag that holds a bunch of smaller div tags which encompasses the deal information. I want to be able to do the same thing essentially with asp.net. I do not want to use JavaScript or PHP, only c#. If I have to use JS/php I will, but it is only a last resort.

I have all my deal data inside my DB which i am grabbing via Stored proc.

Should I create all the div tags and 'placeholders' first( inside html), then populate one by one, while leaving the others div tags blank until I fill them in?

Or should I generate the div tags and other html elements in the c# code via htmlGenericControl , attach to the html individually, then populate the div tag one by one?

Is there is a better method of which I do not know of?

4

1 回答 1

1

You can use a repeater, you can design your html for one coupon. This will then be repeated for every row in your dataset. I suggest you read these articles:

here and here

于 2013-03-29T22:32:55.550 回答