Cookies.(\"navn\").Expires
HejJeg kalder en cookies.asp via en form.
cookies.asp indeholder følgende :
<%
If Request.Form(\"indstillinger\") = \"udfyld\" Then
Response.Cookies(\"login\")(\"Data\") = \"Udfyld\"
Response.Cookies(\"login\")(\"RealName\") = Request.Cookies(\"Oplysninger\")(\"RealName\")
Response.Cookies(\"login\")(\"Username\") = Request.Cookies(\"Oplysninger\")(\"Username\")
Response.Cookies(\"login\")(\"Password\") = Request.Cookies(\"Oplysninger\")(\"Password\")
Response.Cookies(\"login\")(\"Indstilling\") = \"Nuværende indstilling : <font color=\'#ff0000\'><b>Automatisk udfyldning!</b></font>\"
Response.Cookies(\"login\").Path = \"/\"
Response.Cookies(\"login\").Expires = DateAdd(\"n\",5,now)
Response.Redirect(\"lm-handel.asp?valg=indstillinger\")
ElseIf Request.Form(\"indstillinger\") = \"auto\" Then
Response.Cookies(\"login\")(\"Data\") = \"Auto\"
Response.Cookies(\"login\")(\"RealName\") = Request.Cookies(\"Oplysninger\")(\"RealName\")
Response.Cookies(\"login\")(\"Username\") = Request.Cookies(\"Oplysninger\")(\"Username\")
Response.Cookies(\"login\")(\"Password\") = Request.Cookies(\"Oplysninger\")(\"Password\")
Response.Cookies(\"login\")(\"Indstilling\") = \"Nuværende indstilling : <font color=\'#ff0000\'><b>Automatisk login!</b></font>\"
Response.Cookies(\"login\").Path = \"/\"
Response.Cookies(\"login\").Expires = DateAdd(\"n\",5,now)
Response.Redirect(\"lm-handel.asp?valg=indstillinger\")
ElseIf Request.Form(\"indstillinger\") = \"glem\" Then
Response.Cookies(\"login\")(\"Data\") = \"Nej\"
Response.Cookies(\"login\")(\"RealName\") = \"\"
Response.Cookies(\"login\")(\"Username\") = \"\"
Response.Cookies(\"login\")(\"Password\") = \"\"
Response.Cookies(\"login\")(\"Indstilling\") = \"Nuværende indstilling : <font color=\'#ff0000\'><b>Lad være med at gemme oplysningerne!</b></font>\"
Response.Cookies(\"login\").Path = \"/\"
Response.Cookies(\"login\").Expires = DateAdd(\"n\",5,now)
Response.Redirect(\"lm-handel.asp?valg=indstillinger\")
End If
%>
Nu er mit problem det at når jeg kalder,
response.cookies(\"login\").Expires = DateAdd(\"n\",5,now), så gemmer den intet. Men hvis jeg fjerner expies kommandoen så er der ikke nogle problemer overhovedet.
Hvad gør jeg forkert.
Regards
Rütger Jacobsen
http://www.iceweb.dk
