|
-
Dec 26th, 2000, 06:26 AM
#1
Hiyas, I am trying to use cookies on an asp page, and its working, but it only seems to be creating a temp cookie and then as soon as ie is closed the cookie is gone, and when you go back to the page, it can't get the cookie, yet if that ie is open you can go to any page of that site, and it can get the cookie but as soon as that ie closes its gone...
i am wanting to create a cookie which is saved as a cookie and won't be deleted when that browser is closed, so say the day after unless they have cleared all their cookies the page will be able to access that cookie.
the way i am trying to create cookies at the moment is:
<%
'to save the cookie
response.cookies("name") = "Fred"
%>
and then on another page to get the cookie i might have:
<%
dim name
name = request.cookies("name")
%>
Welcome, <%=name%>
can someone please tell me a way to set a permenant cookie in asp, well until they delete it themselves?
thanx.
-
Dec 26th, 2000, 07:34 AM
#2
Lively Member
you need to set the expires date, ofcourse.
<%
Response.Cookies("name").Expires = expireDate
%>
cookies without expire data are indeed deleted
when ie is closed.
you might run into some minor difficulties
figuring out the exact format for the expire date,
but i'm sure you'll find it.
goodluck.
itay.
-
Dec 26th, 2000, 11:47 PM
#3
thanx a million italy it works fine now .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|