G
Guest
Dear all,
I try to make some test on how to use basic cookie but get some trouble in
the sens that I was not able to read back previous cretaed cookies.
In page_load event I have the following code :
If Not IsPostBack Then
If Request.Browser.Cookies Then
If Not IsNothing(Request.Cookies("PS")) Then
Session("Server") = Request.Cookies("PS").Value
txtServerName.Text = Session("Server")
End If
End If
end if
Somewhere in my code I set the cookie as follow :
If Request.Browser.Cookies Then
Dim ck_SrvName As New HttpCookie("PS")
ck_SrvName.Value = txtServerName.Text
Response.Cookies.Add(ck_SrvName)
End If
When I restart my application, my cookies object do not return it s content,
what am I doing wrong in here ?
thanks for your help
regards
serge
I try to make some test on how to use basic cookie but get some trouble in
the sens that I was not able to read back previous cretaed cookies.
In page_load event I have the following code :
If Not IsPostBack Then
If Request.Browser.Cookies Then
If Not IsNothing(Request.Cookies("PS")) Then
Session("Server") = Request.Cookies("PS").Value
txtServerName.Text = Session("Server")
End If
End If
end if
Somewhere in my code I set the cookie as follow :
If Request.Browser.Cookies Then
Dim ck_SrvName As New HttpCookie("PS")
ck_SrvName.Value = txtServerName.Text
Response.Cookies.Add(ck_SrvName)
End If
When I restart my application, my cookies object do not return it s content,
what am I doing wrong in here ?
thanks for your help
regards
serge