cookies....

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
 
H

Hans Kesting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

cookie.domain bug?? 2
Cookies only work on localhost? 0
Cookies 1
Cookies 1
cookies not persisting 2
cookies in asp.net 2
httpCookie is null 4
Problem with accessing cookies? 3

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top