cookies not working in firefox and ie

Posted by Karthikreddy under ASP.NET on 8/9/2013 | Points: 10 | Views : 853 | Status : [Member] | Replies : 0

i created cookie using below code . i am checking on page load whether cookie is null or not if null redirect to login page else redirect lo homepage
its working fine in chrome but not in firefox and IE (if close the firefox and IE browser cookie is showing null but not in chrome)
 string hrcookie = txtusername.Text;
HttpCookie cookie = new HttpCookie("HRcookie", hrcookie);
cookie.Expires = DateTime.Now.AddDays(1);
// Response.Cookies["HRcookie"].Expires = DateTime.Now.AddDays(1);


plse any solutions




(No response found.)

Login to post response