troubleshooting Question

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

Avatar of Wayne Barron
Wayne BarronFlag for United States of America asked on
Visual Basic.NETSQL
1 Comment1 Solution92 ViewsLast Modified:
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")))
The Cookie is then read with this.
Request.Cookies("theFArtistCookie").Value)

A response.write, gives the correct value. (Sometimes, as I found out a little later on after posting this)
                
Response.Write(Request.Cookies("theAlbumCookie").Value)
Response.End()

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
Thanks.
Wayne
ASKER CERTIFIED SOLUTION
Wayne Barron
Author, Web Developer
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros