cookie access

Posted on 2012-04-12
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.


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

ASP - read

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

response.write strUsername
Question by:goodluck11
  • 2

Author Comment

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

Accepted Solution

Kumaraswamy R earned 500 total points
ID: 37841182

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


Author Comment

ID: 37845264

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

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

Suggested Solutions

Title # Comments Views Activity
DateTimepicker 4 33
Error when loading the database 16 57
Syntax Error 2 46
Importing CSV file encoded in UTF-8 in SQL SERVER 2008 using BULK INSERT 5 30
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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

15 Experts available now in Live!

Get 1:1 Help Now