Solved

Setting a Cookie using ASP

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

837 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