Before creating cookie you need to check whether that cookie with tat name already exits or not.Right now you are creating cookie without checking whether it is already there in client side. thats mean ur cookie value get override each time.
Put ur code like this:
HttpCookie myCookie = new HttpCookie("MyTestCookie");
myCookie = Request.Cookies["MyTestCookie"];
// Check for cookie already present
if (myCookie != null)
Response.Write("Cookie is already there.");
else
{
//create cookie
HttpCookie myCookie = new HttpCookie("MyTestCookie");
DateTime now = DateTime.Now;
// Set the cookie value.
myCookie.Value = now.ToString();
// Set the cookie expiration date.
myCookie.Expires = now.AddYears(50); // For a cookie to effectively never expire
// Add the cookie.
Response.Cookies.Add(myCookie);
Response.Write("The cookie has been written.");
}
Ur reading cookie code remains same as u hav written already
hope this helps u out.