cookies....

  • Thread starter Thread starter Jenny
  • Start date Start date
J

Jenny

Hi guys

I dont know, what I'm doing wrong but meanwhile I hate the
cookie subject....
This is my source

Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load

Dim cookie As New HttpCookie("TestCookie")
cookie.Name = "TestCookie"
cookie.Value = "1"
Response.Cookies.Add(cookie)

End Sub

If I'm accesing the page via IE there is no cookie. If I'm
visiting yahoo for test purposes i lot of cookies are stored.
What is wrong?

Thanks
Jenny
 
Jenny said:
Hi guys

I dont know, what I'm doing wrong but meanwhile I hate the
cookie subject....
This is my source

Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load

Dim cookie As New HttpCookie("TestCookie")
cookie.Name = "TestCookie"
cookie.Value = "1"
Response.Cookies.Add(cookie)

End Sub

If I'm accesing the page via IE there is no cookie. If I'm
visiting yahoo for test purposes i lot of cookies are stored.
What is wrong?

Thanks
Jenny

Jenny,

The cookie needs an expiry-date to be stored (without one it is considered
temporary)

Hans Kesting
 
Back
Top