Solved

Setting a Cookie using ASP

Posted on 1998-10-11
4
193 Views
Last Modified: 2010-04-30
I have a page where I need to give the user a Cookie.
This works with IE, but not with Netscape?

Code:

 Dim cookieStr
 cookieStr = Request.Cookies("Nettet")("SearchEngine")
 '
   Dim SearchString
   Dim Engine
   Dim RedirTo
   '
   SearchString = Request.Form("SearchString")
   Engine = Request.Form("Engine")
   '
   Response.Cookies("Nettet")("SearchEngine") = Engine
   Response.Cookies("Nettet").Expires = Date + 365
   Response.Cookies("Nettet").Domain = ".jfl.dk"
   Response.Cookies("Nettet").Path = "/nettet"
   Response.Cookies("Nettet").Secure = FALSE

...
0
Comment
Question by:jfl
  • 2
4 Comments
 
LVL 1

Expert Comment

by:mr_krishna
ID: 1439260
In Netscape browser,Goto Edit menu then goto preferences here goto cookies frame then select the radio button "Accept all cookies". Then it works.
0
 

Author Comment

by:jfl
ID: 1439261
No it doesn't.
0
 

Author Comment

by:jfl
ID: 1439262
"Accept all cookies" is on, so that's not the problem.
0
 
LVL 3

Accepted Solution

by:
BGillham earned 20 total points
ID: 1439263
I have had no problem with this code - beware of Browser Version
This may be obvious but make sure that you RUN AT SERVER.
<%
Response.Cookies("Application")("Alias")    = Session("Alias")
Response.Cookies("Application")("LastTime") = Date
Session("Alias")   = Request.Cookies("Application")("Alias")
Session("LasTime") = Request.Cookies("Application")("LastTime")
%>

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

680 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