D
dave
I have 2 pages... in the first page i check to see for
the existance of the cookie, if found do something else
set the value and set the cookie.
(cookie gets set ok)
I use the following code to read and write the cookie..
READ..
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
WRITE
Dim c As New HttpCookie("HD")
c("DialogTypeID") = DialogTypeID.ToString
c.Expires = DateTime.Now.AddYears(1)
HttpContext.Current.Response.Cookies.Add(c)
Now i navigate to a second page which looks for a cookie
of a differnt name and reads the value. The following
code...
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD2")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
Now when i navigate back to the first page the first
cookie is gone. I look in my localhost cookies and it is
no longer in the cookie file. PLEASE tell me what is
going on.
please.
thank you in advance...
dave
the existance of the cookie, if found do something else
set the value and set the cookie.
(cookie gets set ok)
I use the following code to read and write the cookie..
READ..
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
WRITE
Dim c As New HttpCookie("HD")
c("DialogTypeID") = DialogTypeID.ToString
c.Expires = DateTime.Now.AddYears(1)
HttpContext.Current.Response.Cookies.Add(c)
Now i navigate to a second page which looks for a cookie
of a differnt name and reads the value. The following
code...
Dim stmp As String
Dim c As HttpCookie =
HttpContext.Current.Request.Cookies("HD2")
If Not c Is Nothing Then
stmp = c(Key)
Else
stmp = ""
End If
Return stmp
Now when i navigate back to the first page the first
cookie is gone. I look in my localhost cookies and it is
no longer in the cookie file. PLEASE tell me what is
going on.
please.
thank you in advance...
dave