I have the following code:
if (Response.Cookies["888"] == null)
aCookie = new HttpCookie("888");
aCookie.Value = System.Guid.NewGuid().ToString();
aCookie.Expires = DateTime.Now.AddDays(7);
I've just used a dummy name 888 for now but I'm trying to check to see if a cookie exists and if not create it.
However the code above always gets stepped over, even when the cookie shouldn't exist.
Am I doing the correct check?