cookie in detail -
//fist check whether cookie exists(created before)
HttpCookie Mitsol_HttpCookieComid = Request.Cookies["Mitsol_HttpCookieComId"];
//if exists
if (Mitsol_HttpCookieComid != null)
{ //do anything with the cookie value }
//not exists create new cookie
else
{
HttpCookie Mitsol_HttpCookieComId = new HttpCookie("Mitsol_HttpCookieComId");
Mitsol_HttpCookieComId.Value = id.ToString();
Response.Cookies.Add(Mitsol_HttpCookieComId);
}