Cookies do not work with IE. The browser allows the use of cookies. It works fine in Firefox ... and works fine in IE when I run it locally. But as soon as I publish, it breaks. It is used for polling, so the user cannot vote more than once. The following code runs as soon as the user tries to vote:
if (Request.Cookies["Poll"] != null && Request.Cookies["Poll"].Value == "Voted")
{
lblVoted.Visible= true;
}
else
{
Response.Cookies["Poll"].Value = "Voted";
Response.Cookies["Poll"].Expires = DateTime.Now.AddDays(30);
}
source
share