HI,
I have a curious problem, im sure I am missing something really silly. Before I post a load of code I want to check the principle of what I am doing.... incase its obvious.
In my asp.net web page I am using c# to append items to a shopping basket the data being stored in a cookie. I then display a summary of that basket in another area of the page.
As items are added to the cookie i want the summary area to auto update. what I find is that the summary area always lags one behind. ie if i add an item called 'widget1' to the basket by hitting my add button... nothing happens.. but if I then add say 'widget2' the basket summary will show there s a 'widget1' in the basket.
I then add 'widget3' and the basket will now show there is a 'widget1' and a 'widget2' in the basket and so on..
If I have a seperate 'Refresh' button the page that a user manual clicks after adding an item to the basket then the summary will look correct.
I cant help but think I am missing some general principle when dealing with cookies.
anyone got any thoughts?
I have a curious problem, im sure I am missing something really silly. Before I post a load of code I want to check the principle of what I am doing.... incase its obvious.
In my asp.net web page I am using c# to append items to a shopping basket the data being stored in a cookie. I then display a summary of that basket in another area of the page.
As items are added to the cookie i want the summary area to auto update. what I find is that the summary area always lags one behind. ie if i add an item called 'widget1' to the basket by hitting my add button... nothing happens.. but if I then add say 'widget2' the basket summary will show there s a 'widget1' in the basket.
I then add 'widget3' and the basket will now show there is a 'widget1' and a 'widget2' in the basket and so on..
If I have a seperate 'Refresh' button the page that a user manual clicks after adding an item to the basket then the summary will look correct.
I cant help but think I am missing some general principle when dealing with cookies.
anyone got any thoughts?