I want to keep it in cookie instead of session

How do I keep the value in a cookie or a header instead of session; I do not know how to keep socket data in session. I tried Application[“socket”]=”127.0.0.1:3306″; did not work Session.Add(“socket”, sender); Socket s = (Socket)Session[“socket”]; try { if (Request.HttpMethod == "POST") { String status = Request.QueryString.Get("status").ToUpper(); if (status == "welcome") { try … Read more