// set cookie HttpCookie cookie = new HttpCookie("uid"); cookie.Value =user.ID; cookie.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cookie);
//get cookie in ashx file HttpCookie cookie = context.Request.Cookies.Get("uid"); string id = cookie.Value;
HttpCookie cookie =(HttpCookie)HttpContext.Current.Request.Cookies["uid"]; string id = cookie.Value;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)