I am modifying an ASP program and need to add a cookie which will keep track of where a person as last visited. Lets say the Cookie will be called loc.
With the following code getting executed whenever a user changes his location:
Response.Cookies("loc") = locID
Response.Cookies("loc").Expires = Now() + 50
locID is a varible which can run from 1 to 12. On the first save of this cookie, it does OK. After than it appends the came name in the cookie with the new value. Thus you have after the second selection, 2 enties for loc. In retrieving the cookie for loc, it reads the first occurrence. What is the way to prevent having the multiple entries for the same cookie?