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
Solved

ASP.net Creating Cookie from scratch using VB.ner

Posted on 2013-10-23
2
195 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

808 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