0

Here is what my page cookies list looks like before doing anything:

enter image description here

I run through this code:

enter image description here

I get this result:

enter image description here

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?

Khaltazar
  • 296
  • 1
  • 7

1 Answers1

0

The problem was because I was using if (Response.Cookies["Account"] != null) {} rather than if (Request.Cookies["Account"] != null) {}.

Khaltazar
  • 296
  • 1
  • 7