Solved

cookie access

Posted on 2012-04-12
3
185 Views
Last Modified: 2012-06-21
we create a cookie in c# to later be access on asp. It was working but now seems ASP doesnt read it. We check on the browser and the cookie is created. Please any ideas. Thanks in advances.

c#

 System.Web.HttpCookie UserNameCookie = new System.Web.HttpCookie("UserName");
                    UserNameCookie.Value = objUser.Username;
                    UserNameCookie.Expires = DateTime.Now.AddDays(5);
                    Response.Cookies.Add(UserNameCookie);

ASP - read

Dim strUsername
strUsername = Request.Cookies("UserName")

response.write strUsername
response.end
0
Comment
Question by:goodluck11
  • 2
3 Comments
 

Author Comment

by:goodluck11
ID: 37840563
Asp not writing anything in the browser when called
0
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 37841182
hi


The "Request.Cookies" command is used to retrieve a cookie value



MORE INFO
http://www.codefixer.com/tutorials/cookies.asp
http://www.w3schools.com/asp/asp_cookies.asp
0
 

Author Comment

by:goodluck11
ID: 37845264
Hi

Yes that's what we are trying retrieve the value, please see the ASP code
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

832 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