Here is what my page cookies list looks like before doing anything:
I run through this code:
I get this result:
I can get it to say Account under Name, Value as CookieName1 and the value in userName along with the expire time only if I rename HttpCookie("Account") to say HttpCookie("Account1"), however, after doing so Account becomes Account1 and the process repeats itself until I rename that to Account2, etc.
Can anyone see any obvious issue with this?
The problem was because I was using if (Response.Cookies["Account"] != null) {}
rather than if (Request.Cookies["Account"] != null) {}
.