[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

About Cookies in ASP

Posted on 2000-03-16
4
Medium Priority
?
265 Views
Last Modified: 2008-02-20
Hello all experts,

I can only write my cookies, but cannot read its data. Does anyone know what's wrong in my code or I have to set some configuration at the server?

Here is my code:
[File SaveCookies.asp]
<%
  Response.Buffer = True
  Response.Cookies("Test").Expires = "June 20, 2000"
  Response.Cookies("Test").Secure = False
  Response.Cookies("Test")("Name") = "Peerapol"
%>


[File ReadCookies.asp]
<%
  Response.Buffer = True
  Name = Response.Cookies("Test")("Name")
  Response.Write(Name)
%>

When I run ReadCookies.asp, my browser will report error.
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Response.Cookies(...)'

Note: My server is Windows2000 Advanced Server, and uses IIS.

Thanks in advance,
Peerapol
0
Comment
Question by:Mr_Peerapol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:mberumen
ID: 2626502
MR. Peerapol

to read your cookies you need to use the request object

i.e.




                      [File ReadCookies.asp]
                      <%
                        Response.Buffer = True
                        Name =Request.Cookies("Test")("Name")
                        Response.Write(Name)
                      %>

regards
0
 
LVL 25

Author Comment

by:Mr_Peerapol
ID: 2626951
mberumen ,

Please post your comment as the answer, I will accept it.

Thanks,
Peerapol
0
 
LVL 4

Accepted Solution

by:
mberumen earned 200 total points
ID: 2628979
MR. Peerapol

if you look at your screen there will be a link on the right side of the comment that says "accept comment as an answer"

it is customary to post answers as comments.  if  that way more people can contribute to your solution.    

good luck

                      to read your cookies you need to use the request object

                      i.e.




                                            [File ReadCookies.asp]
                                            <%
                                              Response.Buffer = True
                                              Name =Request.Cookies("Test")("Name")
                                              Response.Write(Name)
                                            %>

                      regards
0
 
LVL 25

Author Comment

by:Mr_Peerapol
ID: 2630534
Thanks,
Peerapol
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question