Solved

Setting a Cookie using ASP

Posted on 1998-10-11
4
167 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now