views:

37

answers:

5

I have various SQL tables and my use case is:

I'll choose 5 Products at random and they'll show in X control (don't know what to use here).

I know I'll have to use SQL and pull the product information using the ProductID as the hook to fish out every other information.

What Control should I use?

A: 

Depends how you want do display it.

Maybe a Repeater and ObjectDataSource will be useful, depending on your ORM.

Noon Silk
A: 

Maybe a DataList, maybe a Repeater. explain more about what you want to show.

Cleiton
A: 

Two possibilities spring to my half-asleep mind.

the first would be to use a ListView or Repeater and have it themed out appropriately.

The second possibility would be to create a user control that displays the way you want, and then instantiate 5 instances on the web page.

Stephen Wrighton
A: 

I would make a user control that would take an array of ids as a property. Encapsulated in the user control would be everything you need to do to display your products. This would probably be an array of panels with images and labels.

JBrooks
+1  A: 

---If you want to show random product, then Adrotator is the best choice
---If you are getting product randomly from DB then Repeater or datalist could be the best choice

Muhammad Akhtar