Solved

Setting a Cookie using ASP

Posted on 1998-10-11
4
157 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
Comment Utility
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
Comment Utility
No it doesn't.
0
 

Author Comment

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

Accepted Solution

by:
BGillham earned 20 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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

11 Experts available now in Live!

Get 1:1 Help Now