I need a cookie to remember a users login info. I have been trying this:
setting cookie-->
dim userID as new HttpCookie("myUserID"
userID.value = textbox1.text
Response.Cookies.Add(userID)
userID.expires = now.AddDays(30)
getting cookie value-->
textbox1.text = response.cookies("myUserID".value
I know the cookie is created, since I can see it in the cookies folder, but when I visit the page again, the cookie is deleted from the folder, and the value does not appear in textbox1.
Am I doing something wrong? This is the first time I've ever set a cookie in asp.net, so any suggestion would be of great help.
Thanx,
drew10
setting cookie-->
dim userID as new HttpCookie("myUserID"
userID.value = textbox1.text
Response.Cookies.Add(userID)
userID.expires = now.AddDays(30)
getting cookie value-->
textbox1.text = response.cookies("myUserID".value
I know the cookie is created, since I can see it in the cookies folder, but when I visit the page again, the cookie is deleted from the folder, and the value does not appear in textbox1.
Am I doing something wrong? This is the first time I've ever set a cookie in asp.net, so any suggestion would be of great help.
Thanx,
drew10