Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice on best approach

Status
Not open for further replies.

davisg

IS-IT--Management
Sep 21, 2002
35
GB
Hi,

I have a cookie based shopping cart which gets displayed into a datagrid as 'product, description, price and seller' and looks like this: -

product description price seller
a1 a1 10.00 s1
a2 a2 15.00 s1
a3 a3 20.00 s2
a4 a4 25.00 s3

Now I want to create a page which displays the shopping cart like this: -

seller s1
product description price
a1 a1 10.00
a2 a2 15.00

seller s2
product description price
a3 a3 20.00

seller s3
product description price
a4 a4 25.00

Each of the sellers will be displayed in a nice box and the product information will still be in a datagrid.

1. Should the above be a usercontrol and somehow pass over the seller to it?

2. Could I get away with using a datalist template?

I am no expert on creating dynamic content like this so some pointers would be appreciated.



Thanks

Geoff.
 
I would definetly put it into a user control. I try to put most things into a user control then let the page simply display that control. As far as displaying the data you might want to dynamically create a datagrid for each seller and use a dataview to bind the data to it.

You approach would work as well. Simply have a SellerID property or a DataSource Property for the user control.
Then set the Seller ID or DataSource for each Seller in the data from you calling page.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top