The HttpCookie class gets and sets properties of individual cookies.
HttpCookie loginCookie = Request.Cookies.Get("loginCookie");
if (loginCookie == null)
{
loginCookie = new HttpCookie("loginCookie");
loginCookie.Value = txtUsr.Text;
loginCookie.Expires = DateTime.Now.AddDays(15);
Response.Cookies.Add(loginCookie);
}