J
Jimmy
Problem:
My cookie name is supposed to be "MyCookie123whatever..." but when I
take a look at my cookies, it's called "SITESERVER" and it's not
keeping any of the properties (expiration, etc..) that I've set in the
codebehind.
Code:
HttpCookie myCookie = Request.Cookies["MyCookie"];
//check to see if it exists
if (myCookie == null)
{
//build the cookie
HttpCookie newCookie = new HttpCookie("MyCookie");
newCookie.Expires = DateTime.Now.AddDays(7.0);
//add the cookie
Response.Cookies.Add(newCookie);
}
else
{
Response.Write("cookie exists");
}
Please help...
My cookie name is supposed to be "MyCookie123whatever..." but when I
take a look at my cookies, it's called "SITESERVER" and it's not
keeping any of the properties (expiration, etc..) that I've set in the
codebehind.
Code:
HttpCookie myCookie = Request.Cookies["MyCookie"];
//check to see if it exists
if (myCookie == null)
{
//build the cookie
HttpCookie newCookie = new HttpCookie("MyCookie");
newCookie.Expires = DateTime.Now.AddDays(7.0);
//add the cookie
Response.Cookies.Add(newCookie);
}
else
{
Response.Write("cookie exists");
}
Please help...