ASPSQLVB
11-01-2009, 12:06 AM
Gang,
I am writing a cookie file to the client then retreiving it and storing the values in a couple of text boxes.
The problem is, I cannot retreive the cookie values. I see the file is in the cookie folder but when I try displaying the values it just doesn't work. Nothing is displayed. I am wondering if there is some other code within the webpage that interferes with the retrieval of cookies.
Below is setting the cookie
Dim Login_Holder,Password_Holder
Login_Holder = Request.Form("Login2")
Password_Holder = Trim(Request.Form("Password2"))
If RememberMe1 = "on" Then
Response.Cookies("Login2") = Login_Holder
Response.Cookies("Password2") = Password_Holder
Dim cookieExpiration1
cookieExpiration1 = DateAdd("d",RS3("LengthofEvent"),RS3("StartDate"))
Response.Cookies("Login2").Expires = cookieExpiration1
Response.Cookies("Password2").Expires = cookieExpiration1
End If
Below is retreiving the cookie
<tr>
<td name="Login" align="middle">
<font color="white" size="3">
<b>Username</b>
</font>
<input name="Login2" size="15" value="<%=Request.Cookies("Login2")%>">
</td>
</tr>
<tr>
<td align="middle">
<font color="white" size="3"><b>Password</b></font>
<input type="Password" name="Password2" size="15" value="<%=Request.Cookies("Password2")%>">
</td>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="RememberMe1" size="10"><font color="white" size="2">Remember Me</font>
</td>
</tr>
<tr>
I am writing a cookie file to the client then retreiving it and storing the values in a couple of text boxes.
The problem is, I cannot retreive the cookie values. I see the file is in the cookie folder but when I try displaying the values it just doesn't work. Nothing is displayed. I am wondering if there is some other code within the webpage that interferes with the retrieval of cookies.
Below is setting the cookie
Dim Login_Holder,Password_Holder
Login_Holder = Request.Form("Login2")
Password_Holder = Trim(Request.Form("Password2"))
If RememberMe1 = "on" Then
Response.Cookies("Login2") = Login_Holder
Response.Cookies("Password2") = Password_Holder
Dim cookieExpiration1
cookieExpiration1 = DateAdd("d",RS3("LengthofEvent"),RS3("StartDate"))
Response.Cookies("Login2").Expires = cookieExpiration1
Response.Cookies("Password2").Expires = cookieExpiration1
End If
Below is retreiving the cookie
<tr>
<td name="Login" align="middle">
<font color="white" size="3">
<b>Username</b>
</font>
<input name="Login2" size="15" value="<%=Request.Cookies("Login2")%>">
</td>
</tr>
<tr>
<td align="middle">
<font color="white" size="3"><b>Password</b></font>
<input type="Password" name="Password2" size="15" value="<%=Request.Cookies("Password2")%>">
</td>
</tr>
<tr>
<td align="center">
<input type="checkbox" name="RememberMe1" size="10"><font color="white" size="2">Remember Me</font>
</td>
</tr>
<tr>