Sergio Tapia
Sergio Tapia

Reputation: 41138

What control should I use for showing "Featured Products" on my ASP.net Website?

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?

Upvotes: 1

Views: 122

Answers (5)

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

---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

Upvotes: 1

JBrooks
JBrooks

Reputation: 10013

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.

Upvotes: 0

Stephen Wrighton
Stephen Wrighton

Reputation: 37829

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.

Upvotes: 0

Cleiton
Cleiton

Reputation: 18113

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

Upvotes: 0

Noon Silk
Noon Silk

Reputation: 55082

Depends how you want do display it.

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

Upvotes: 0

Related Questions