Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 04, 2012 01:30 PM by Richey
Apr 29, 2012 02:44 AM|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|LINK
check this link this may help you out
Apr 29, 2012 10:19 AM|LINK
check your google chrome settings....
Apr 29, 2012 10:56 AM|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|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|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|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|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.