We help IT Professionals succeed at work.
Get Started

vb.net Cookie value is one number, but inserts into database as another number?

Last Modified: 2020-03-03
Hello All;

I am having a cookie issue.
(This is in a server farm, I am not sure if that makes to much of a difference, as the Cookie is saved on the client's system and not on the server(s).)
And the screenshot below, you can see the value is (3)
However, when I try to read it into the SQL Query from a vb.net script, it inserts the number (2)
The Cookie is created with this.
Response.Cookies.Set(New HttpCookie("theAlbumCookie", rsAlbum("AlbumID")))

Open in new window

The Cookie is then read with this.

Open in new window

A response.write, gives the correct value. (Sometimes, as I found out a little later on after posting this)

Open in new window

I ran a test real quick and it inserted the correct number.
Then I uploaded another song from another album, and it inserted the number from the previous album, even though the cookie Value is for the current album, which in this case, will be a (4)

Can someone please let me know what is causing it to read the Cookie as a different value, when, as seen in the screenshot, it is a (3)
Cookie Properties
Watch Question
Author, Web Developer
Top Expert 2009
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE