ASP.net Creating Cookie from scratch using VB.ner

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?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CodeCruiserConnect With a Mentor Commented:
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
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0
All Courses

From novice to tech pro — start learning today.