Last post May 04, 2012 01:30 PM by Richey
Apr 29, 2012 02:44 AM|touraine|LINK
I was able to save and read cookie using -Request.Cookies - in IE and FireFox. But I could not read in Chrome. It is always null. The following is my code to save and read the cookie:
HttpCookie test= new HttpCookie("data");
test.Values["Name"] = "hello";
if (Request.Cookies["data"] != null)
txtNm.Text = Server.HtmlDecode(Request.Cookies["data"]["Name"].ToString());
Can someone help me?
Apr 29, 2012 05:45 AM|chiragtoad|LINK
check this link this may help you out
Apr 29, 2012 10:19 AM|ramiramilu|LINK
check your google chrome settings....
Apr 29, 2012 10:56 AM|Ruchira|LINK
If it does not save only in Chrome, then it's a browser setting that prevents the cookie from saving.
Go to the setting in Google Chrome. It will open up a new tab. From there, click "Under the Hood". Under the "Content Settings", you will see a sub category,
Cookies. From the radio button list, choose Allow local data to be set (recommended). And also make sure you have unchecked "Block third-party cookies and site data".
Try again. Now it will work.
Please 'Mark as Answer' if this post helps you.
Apr 29, 2012 02:17 PM|touraine|LINK
Thank you all for replying. I have already did what you have suggested but it still does not work.
Apr 29, 2012 02:24 PM|Ruchira|LINK
It's strange. I suspect your Chrome installation is not stable. Can you reinstall it or can you check it on another PC?
Apr 29, 2012 02:35 PM|touraine|LINK
I also tried on another pc with Windows XP and Windows 7. Uninstall Chrome on both and reinstall but still the same. That's really strange. :-(
May 04, 2012 01:30 PM|Richey|LINK
The problem may be due to your don't enable cookie in Google Chrome. You can enable cookie in chrome with the below link.