Link to home
Start Free TrialLog in
Avatar of chuong25
chuong25

asked on

About My ShoppingCart?

hi ,i develop a shopping cart in ASP.Net ,and I found out a problem ,but i dont know how to solve it ,anyone can help me? My prob is :
In my ShoppingCart ,i create a DataTable ,and use NewRow method to add item into it ,and then bind it to DataGrid ,everything is ok ,but how can i add all the item of that DataTable into my OrderItem table .
 In Case adding 1 Item : I create a Store Procedure and then add that item into my table ,it's easy .
  But how can i add (n) Item into my OrderItem ,that's difficult ,please help me ,i waste me alot of time ,thank you so much
Avatar of SeanLWilliams
SeanLWilliams

Without seeing how your trying to do things ( Ie sections of code )
I would suggest using SQL statements such as    Insert into TABLENAME Select a, b, c, d  from ShoppingCartTableName where ShoppingCartID = XXX  

something like that , obviously need to replace a lot of the variables
Avatar of raj3060
If you are using database then add you data to the database, and retreive it back in order table.
If you are not using database or if you don't want to use database then create an array with all data pass it to the order page.
Let me know if you need more clarification.
--Raj
Avatar of chuong25

ASKER

can you give me an example about an array by C#.THank you so much
ASKER CERTIFIED SOLUTION
Avatar of raj3060
raj3060
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
We did not get response if the suggestions we gave worked or not, I would suggest point split.
-Thanks