Hi there,
I'm developing an ASP.NET app. that requires a login with userID and Password. I would like the last userID that succesfully logged in to appear in the userID.
At the moment it works, but only if i keep the same session open. If I, for example, completely close my browser and get back to the page, the UserID isn't there.
The code i use to write and read the cookies is:
' BEGIN CODE:
Public Sub setCookie(title, name, value)
Dim cookie As new Web.HttpCookie(title)
cookie.Values.Add(name, value)
Response.AppendCookie(cookie)
End Sub
Public Function getCookieValue(title, name) As String
Dim cookie As Web.HttpCookie
cookie = calPage.Request.Cookies(title)
If cookie Is Nothing Then
getCookieValue = ""
Else
getCookieValue = cookie.Values.Get(name)
End If
End Function
'END CODE
How can I permanently store and later retrieve the cookie?
Thanks a lot
Johpje
I'm developing an ASP.NET app. that requires a login with userID and Password. I would like the last userID that succesfully logged in to appear in the userID.
At the moment it works, but only if i keep the same session open. If I, for example, completely close my browser and get back to the page, the UserID isn't there.
The code i use to write and read the cookies is:
' BEGIN CODE:
Public Sub setCookie(title, name, value)
Dim cookie As new Web.HttpCookie(title)
cookie.Values.Add(name, value)
Response.AppendCookie(cookie)
End Sub
Public Function getCookieValue(title, name) As String
Dim cookie As Web.HttpCookie
cookie = calPage.Request.Cookies(title)
If cookie Is Nothing Then
getCookieValue = ""
Else
getCookieValue = cookie.Values.Get(name)
End If
End Function
'END CODE
How can I permanently store and later retrieve the cookie?
Thanks a lot
Johpje