By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Error when writing cookies

P: 5
I am getting the error: Type mismatch:'Expires'
Microsoft VBScript runtime error '800a000d'
on this code:
mailid and local_number are variable that are read from a form.

<%response.cookies("login")("mailid")=mailid %>
<%response.cookies("login")("local_number")=local_ number %>
<%response.cookies("login").Expires="Date + 7" %>

First time I am using cookies. Puzzled with the error. Thanks, Dave
Dec 9 '11 #1
Share this Question
Share on Google+
2 Replies


P: 16
you just have to read the error message: "... mismatch:'expires' ... "

change <%response.cookies("login").Expires="Date + 7" %> to <%response.cookies("login").Expires=Date() + 7 %>

i think that's the problem!
Dec 15 '11 #2

P: 5
Thanks, thought I tried it without the quotes, but I guess not.
Another question, I am doing my login process for username and password using a form and then validating the info via the database running on sql server. I have read that I should not rely solely on cookies because some people disable them. With most browsers set to "autofill" are cookies becoming obsolete? Are they more for the benefit of the programmer, since they require less coding, or are there still good reasons to use them that benefit the end user?
Thanks, Dave
Dec 15 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.