"Siva M" <sh******@online.excite.comwrote in message
news:1D**********************************@microsof t.com...
AddDays() doesn't alter the Expires value (the new value is a return
value).
So, try cookie.Expires = DateTime.Now.AddDays (365);
Nicely spotted mistake in my code but it's still a no-go. Cookies still
won't persist.
.... Played a bit more with my code and, apparently, cookie.Domain =
"localhost" was the other part of the problem. When I removed that line, the
cookie finally got saved. I'm not sure why is this the case? Is it because
I'm not redirecting the page or because P3P in follow-up was missing (as
described in thread "Cookies Disappearing") or...
Thanks a lot.
rb