473,322 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Cookie Expires - can't set in sub?

I have several users data elements that I want to maintain and persist. I've
created a cookie with keys to do this, but having problems with it
persisting.

1. Do you set the .Expires at the Cookie level or at the Key level?

2. Once you set the .Expires, do you need to reset it, if you then change
one of the Key values?

3. If 2 = Yes, then I'd like to have a common routine that set's the expires
property in an include file. I've tried this, but I keep getting the "Object
doesn't support this property or method: 'Response.Cookie'" error. I've
placed the call exactly in the same location on my page as where a the
original Response.Cooke(cookie).expires was (i.e. in the header before the
<HTML> tag)....not sure why you can't do this. Does it have something to do
with it being in an include file?
Sep 28 '05 #1
1 2556
Nevermind on 3...I was using Response.Cookie instead of plural .Cookies

Questions 1&2 seem to be

1. at the header level (not at the key level)
2. Yes...at least for me..I'd like a confirmation of this though...

"Chad Richardson" <chad@NIXSPAM_chadrichardson.com> wrote in message
news:11*************@corp.supernews.com...
I have several users data elements that I want to maintain and persist.
I've created a cookie with keys to do this, but having problems with it
persisting.

1. Do you set the .Expires at the Cookie level or at the Key level?

2. Once you set the .Expires, do you need to reset it, if you then change
one of the Key values?

3. If 2 = Yes, then I'd like to have a common routine that set's the
expires property in an include file. I've tried this, but I keep getting
the "Object doesn't support this property or method: 'Response.Cookie'"
error. I've placed the call exactly in the same location on my page as
where a the original Response.Cooke(cookie).expires was (i.e. in the
header before the <HTML> tag)....not sure why you can't do this. Does it
have something to do with it being in an include file?

Sep 28 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: AHN | last post by:
Please tell me somebody what causes the cookie set with <% Response.Cookies("blah") = "Blah blah" Response.Cookies("blah").Expires = DateAdd( "h", 1, Now() ) %> work as supposed on my local...
4
by: Shannon Jacobs | last post by:
I'm doing some trivial surveys, and I want to know if the same user answers twice. Can't really know that, but at least I thought I could check for the same browser/computer combination by using a...
12
by: chrism | last post by:
Hello, I have a pop-up window that I would like to appear in front of the browser home page when a user opens IE. Problem is, I'd like it to never appear again if the user navigates back to the...
5
by: brettr | last post by:
When I reference document.cookie, there is a long string of key=value; pairs listed. I may have 100 hundred cookies on my hard drive. However, most only have one key=value pair. Does the...
1
by: Mike | last post by:
Hello, I can't find any javascript that reads and writes cookies with keys, so that it is compatible with ASP (I want to read and write cookies from both javascript and ASP) for example in...
6
by: Jason Collins | last post by:
There seems to be an inconsistency (bug?) in the way the Set-Cookie header is handled by the WebHeaderCollection. That is, the values of Set-Cookie, when an Expires is specified, contain the ","...
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
1
by: Henri | last post by:
Hi, My page saves user's login on user's computer using a cookie: Dim expires As Date = DateTime.Now.AddMonths(1) Dim cookie As New HttpCookie("login", loginValue) cookie.Expires = expires...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
0
by: JT | last post by:
I posted a question earlier about communicating between a javascript function and vb.net. In the end I decided to try using a cookie. I use the following javascript function (from vb.net) to set...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.