mehalanandu wrote:
correct this code
Response.Cookies["backgroundcolor"].Value = "Red";
Response.Write(Request.Cookies["backgroundcolor"].Value);
HttpCookie mycookie = new HttpCookie("cookie1");
mycookie.Value = "some cookie value";
mycookie.Expires = DateTime.Now.AddDays(100);
Response.Cookies.Add(mycookie);
Response.Cookies["mycookiename"].Value = "mycookievalue";
Response.Cookies["mycookiename"].Expires = DateTime.Now.AddMinutes(15);
Response.Cookies["visitordata"]["firstname"] =
"select login from registerform where registerform.id='" + Id
+ "'";
Response.Cookies["visitordata"]["lastvisit"] = DateTime.Now.ToString();
if (Request.Cookies["mycookiename"] != null)
mycookievalue = Request.Cookies["mycookiename"].Value;