G
Guest
I have a cookie that is set by a previous ASP page that I wish to update with
the following logic.
MyCookieColl = Request.Cookies;
for (loop1 = 0; loop1 < MyCookieColl.Count ; loop1++) {
MyCookie = MyCookieColl[loop1];
if (MyCookie.Name == "AspenUser") {
MyCookie["TimeZonePK"] = ddTZ.SelectedValue;
MyCookie["Timezone"] = ddTZ.SelectedItem.Text;
Response.Cookies.Set (MyCookie);
}
}
The result of this is two cookies with the same name. The first cookie
retains the original values with the second cookie have the updated values.
I have tried about every code appraoch I could think of. The cookies do not
have Expires. After the above code, I interate thought the Response cookie
object and output the values. There appears to be no cookie with the old
value, but there it is on the next page load along with the new values.
It appears that if I create the cookie on this page and then update it, the
change takes affect correctly. It is only when working witht eh cookie
previously created.
Any help would be appreciated.
Bob Storrs
(e-mail address removed)
the following logic.
MyCookieColl = Request.Cookies;
for (loop1 = 0; loop1 < MyCookieColl.Count ; loop1++) {
MyCookie = MyCookieColl[loop1];
if (MyCookie.Name == "AspenUser") {
MyCookie["TimeZonePK"] = ddTZ.SelectedValue;
MyCookie["Timezone"] = ddTZ.SelectedItem.Text;
Response.Cookies.Set (MyCookie);
}
}
The result of this is two cookies with the same name. The first cookie
retains the original values with the second cookie have the updated values.
I have tried about every code appraoch I could think of. The cookies do not
have Expires. After the above code, I interate thought the Response cookie
object and output the values. There appears to be no cookie with the old
value, but there it is on the next page load along with the new values.
It appears that if I create the cookie on this page and then update it, the
change takes affect correctly. It is only when working witht eh cookie
previously created.
Any help would be appreciated.
Bob Storrs
(e-mail address removed)