Solved

cookie access

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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript to set controls visibility 5 34
Regular expression help 2 25
VB.Net - MemoryMappedFiles - Confirm receipt 2 19
MVC DDL Json Not Binding to Model 2 13
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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!
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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