It looks like you haven't set the Expires
property of the cookie. If you don't provide a date to this property, the cookie will only last for the current browser session (it's not saved to disk, and deleted when you close the last browser window).
On Cookie1.aspx, make the cookie last 30 minutes with this code (from the MSDN page I linked to in this post):
DateTime dt = DateTime.Now;
TimeSpan ts = new TimeSpan(0, 0, 30, 0);
HttpCookie MyCookie = new HttpCookie("Background");
MyCookie.Value = MyDropDownList.SelectedItem.Text;
MyCookie.Expires = dt.Add(ts);
This way, even if you close the browser, the cookie will last for 30 minutes (by saving it to disk).
You should also never assume that a cookie exists. That means that on Cookie2,aspx, you should find out if the cookie is null or not. If it isn't, retrieve and use its value, otherwise make up a (default)value, or skip the code entirely:
if (Request.Cookies["Background"] != null)
// Cookie does not exist. Return a default value
This way, even if the cookie doesn't exist, you won't get an error, but you get the default background color instead.
Does this help?
Everyone is unique, except for me.