hitman3030
asked on
Can only read javascript cookie with .net in directory it was created?
I have a cookie set on landing page with javascript like below:
...
I can read it on the next page using this vb code, but only if that page is in the same directory where the javascript created it. How can I overcome this limitation?
...
setCookie('cSizeSpeed', speedsize, 1);
...
function setCookie(c_name, value, exdays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
document.cookie = c_name + "=" + c_value;
}
I can read it on the next page using this vb code, but only if that page is in the same directory where the javascript created it. How can I overcome this limitation?
If Not IsNothing(Request.Cookies("cSizeSpeed")) Then
strSpeedSize = Request.Cookies("cSizeSpeed").Value
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.