Updating cookie

V

VB Programmer

I have a cookie that is set by an ASP page. I can read it fine in my ASPX
page, but the update does not seem to work. Any ideas? Here's the code:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' Get the cookie value
Dim i As Short = Request.Cookies("NumVisits").Value()

' Write it to the screen
Response.Write(i)

' Increment the value by 1
Request.Cookies("NumVisits").Value = i + 1
End Sub
 
V

VB Programmer

Sorry, when I write the cookie I meant to use this:
Response.Cookies("NumVisits").Value = i + 1

But, it still doesn't work. Any ideas?
 

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

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top