I am trying to code the "remember" me feature in a login form on a 3 pages website. I am using this code but.. the cookies are not stored (I have the option on fireworks to store cookie on)
Private Sub RememberMe()
Dim CookieUsername As System.Web.HttpCookie = Nothing
Dim CookiePassword As System.Web.HttpCookie = Nothing
'if form has not been filled in then display it otherwise check the details submitted
If Not Username.Text = String.Empty AndAlso Not Password.Text = String.Empty Then
If CheckBox1.Checked = True Then
Response.Cookies("CookieUs
ername").V
alue = Username.Text
Response.Cookies("CookieUs
ername").V
alue = Password.Text
Response.Cookies("CookieUs
ername").E
xpires = DateTime.Now.AddMonths(1)
Response.Cookies("CookiePa
ssword").E
xpires = DateTime.Now.AddMonths(1)
Else
Response.Cookies("CookieUs
ername").V
alue = ""
Response.Cookies("CookieUs
ername").V
alue = ""
End If
End If
do i have to add othe rcode or set up properties in order for this to work. i use VS 2005
Start Free Trial