I'm developing an e-trade web application in ASP.NET.
To buy anything,first, users have to login. Let's say user logged in and started to shop. When user taps to btnBuy, i'm adding this item to a collection. Everything is working well so far.
Suppose that user bought something,bought means here, i added item chosen to the
Basket which contains all the items chosen
,then closed the web browser. What i do want to do is to store this data to be able to retrieve this data when user comes back. So,users are able to pick up where they leave off.
So far,i think of 2 options:
1-)Use XML file to retrieve data : I can use XML file to retrieve data but,here the problem is when user deleted an item chosen,i need to parse all the XML file to delete item chose,well ,what i think it's expensive.It makes the application very slower.
2-) Store in database : I think of storing in the database,but i think it's expensive as well. Because,every time users pick or leave someting, i need to make connection ,request ,query etc.
Do u guys any idea,what is the best way to do that ? Am i on the right track here ?
Thank you.