J
Josh T
As of now I am setting a cookie on my aspx page via javascript,
function SetCookie(cookieName, value, minutesToExpire)
{
ClearCookie(cookieName);
var expireDate = new Date();
var cookieValue;
expireDate.setMinutes(expireDate.getMinutes() +
minutesToExpire);
cookieValue = cookieName + "=" + escape(value) +
";expires=" + expireDate.toGMTString();
document.cookie = cookieValue;
}
I know the cookie is created and set correctly (thx to a nifty cookie
manager). After the cookie is set, i have the javascript redirect the
user to a second aspx page. This second page is where I'm trying to
retrieve the cookie
HttpCookie cookie = Response.Cookies.Get("myCookieName");
But the code either shows that there is no cookie set, or that the
value is empty. Any ideas? Should i be setting a path for the cookie
or am i totally off base here? Any/all thoughts and solutions are
welcome.
Thanks,
Josh T
function SetCookie(cookieName, value, minutesToExpire)
{
ClearCookie(cookieName);
var expireDate = new Date();
var cookieValue;
expireDate.setMinutes(expireDate.getMinutes() +
minutesToExpire);
cookieValue = cookieName + "=" + escape(value) +
";expires=" + expireDate.toGMTString();
document.cookie = cookieValue;
}
I know the cookie is created and set correctly (thx to a nifty cookie
manager). After the cookie is set, i have the javascript redirect the
user to a second aspx page. This second page is where I'm trying to
retrieve the cookie
HttpCookie cookie = Response.Cookies.Get("myCookieName");
But the code either shows that there is no cookie set, or that the
value is empty. Any ideas? Should i be setting a path for the cookie
or am i totally off base here? Any/all thoughts and solutions are
welcome.
Thanks,
Josh T