Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.net Creating Cookie from scratch using VB.ner

Posted on 2013-10-23
2
Medium Priority
?
207 Views
Last Modified: 2013-10-28
Hi

I do not want to use the ASP.net login area but want to use a cookie to just display the person's name. I have a single text box where the user enters their name.
When they come back to the website I want to simply greet them with their name.
How do I do this?
0
Comment
Question by:Murray Brown
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 39594433
Try this

http://msdn.microsoft.com/en-us/library/78c837bd(v=vs.100).aspx

Dim myCookie As HttpCookie = New HttpCookie("UserName")
myCookie("Name") = txtName.Text
myCookie.Expires = Now.AddDays(1)
Response.Cookies.Add(myCookie)

Open in new window

0
 

Author Closing Comment

by:Murray Brown
ID: 39605272
thanks very much
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

772 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