A
anony
Hi,
I'm building a shop site where the cart is stored in the session state. I'm
having a problem with a particular page that processes a code which adds
products to the cart at a discount. I have an unhandled exception that
results from the session expiring before processing the code. It goes
something like this:
1) Enter code.
2) Code is validated. Products are added to a datatable in session state.
Products / discounts are shown to user and user is prompted to process code.
3) User processes code. If session is alive, all is well and products are
added to cart. If the session expires after the user enters the code but
prior to processing code, my datatable listed above is no longer available
and thus my problem presents itself.
I'm looking for suggestions on how I should (better) implement the above. I
suppose I could put the product table into the page's viewstate? More
elegantly, I would like to check to see if a new session was created during
step 3 above.
Thanks for any help.
I'm building a shop site where the cart is stored in the session state. I'm
having a problem with a particular page that processes a code which adds
products to the cart at a discount. I have an unhandled exception that
results from the session expiring before processing the code. It goes
something like this:
1) Enter code.
2) Code is validated. Products are added to a datatable in session state.
Products / discounts are shown to user and user is prompted to process code.
3) User processes code. If session is alive, all is well and products are
added to cart. If the session expires after the user enters the code but
prior to processing code, my datatable listed above is no longer available
and thus my problem presents itself.
I'm looking for suggestions on how I should (better) implement the above. I
suppose I could put the product table into the page's viewstate? More
elegantly, I would like to check to see if a new session was created during
step 3 above.
Thanks for any help.