ASP.NET uygulamalarında cookie okumak yazmak için HttpCookie sınıfını kullanırız.Basit olarak kullanımı aşağıdaki gibidir;
Cookie yaratmak
myCook=new HttpCookie("BenimKurabiyem");
myCook.Expires=DateTime.Now.AddHours(1);
myCook["Deger1"]="The quick brown dog";
myCook["Deger2"]="bites the lazy fox";
this.Page.Response.Cookies.Add(MyCook);
Cookie bilgilerini okumak
HttpCookie myCook=this.Page.Request.Cookies["BenimKurabiyem"];
string strDeger1=myCook["Deger1"].ToString();
string strDeger2=myCook["Deger2"].ToString();
