Solved

ASP.net Creating Cookie from scratch using VB.ner

Posted on 2013-10-23
2
185 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:murbro
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 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:murbro
ID: 39605272
thanks very much
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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