I have a situation where I need access to a shopping cart over several pages. So, on the product page - create the cart an add some items On the cart checkout page - confirm the billing address On the cart checkout post - do a final check, add cart to DB and go off to payment
My question is, whats the best way to pass around the cart?
I have tried passing the Cart from page to postback and keeping all the values alive, however on some pages (the billing address confirmation page) this seems like a lot of hassle, all I want to check is the billing address and dont really want tons of HiddenFor() on the page to populate the cart back again
TempData[] is what I used for the product to checkout page, then wondered is it best to keep on setting TempData all the time when....
you could just use a session variable?
For some reason I read its not great practice to use Session, hence the question.
Thanks for your guidance, I can happy provide some code/more info if you deem it helpful.