><asp:CheckBox ID="LoginCtrl" runat="server" OnCheckedChanged="check"Text="Ricordami" />
modificalo cosi
<asp:CheckBox ID="LoginCtrl" runat="server" Text="Ricordami" />
Ti scrivo in Vb.net
Eliminazione cookie
Request.Cookies.Remove("nomecookie")
Lettura cookie
Request.Cookies("nomecookie").Value
Scrittura cookie
Dim cookie As HttpCookie = New HttpCookie("nomecookie")
cookie.item("nomevalore")= "valore"
cookie.Expires = #10/12/2005#
Response.Cookies.Add(cookie)
detto cio il tuo codice deve essere una cosa del genere
if proceduraLogin(Utente,password)=true then
'login andato a buon fine
if loginctrl.check=checked then
Request.Cookies.Remove("nomecookie")
Dim cookie As HttpCookie = New HttpCookie("nomecookie")
cookie.item("nomevalore")= "valore"
cookie.item("nomevalore1")= "valore1"
cookie.Expires = #10/12/2005# ' scadenza
Response.Cookies.Add(cookie)
end if
end if
nell'evento di modifica dell'user inserirai:
Dim cookie As HttpCookie = Request.Cookies("nomecookie")
If not cookie is nothing then 'verifica in caso di cookie inesistente
password.text=cookie.item("password")
end if
Guardati un po questi esempi che ho scritto al volo quindi scusami se ci sono errori ma questa è la procedura che dovresti adottare
__.__.__.__.__.__
ASP 2.0 - VB 2008