Solved

ASP.net Creating Cookie from scratch using VB.ner

Posted on 2013-10-23
2
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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