Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookie create not working for value

Status
Not open for further replies.

dinosf

Technical User
Dec 27, 2002
11
0
0
hey guys - apologies for 2 posts today, I gave up on the solution I previously asked for and have one that is very close to working but I can't figure out the value issue

I'm adding an onclick event to an image button, I want it to set up a cookie and then get it later. The problem is that the value is not appearing in the cookie, even though it's being created and the name is accurate no value appears, I'm guessing it's a minor syntax error. This is written in VB which requires the double quotes when creating strings (e.g. "Text" & Variable & "Text" to get "TextVariableText" as a string), this leaves the single quotes specifically for javascript.

Thanks,
Dean

strResult = "document.cookie = 'TermID=" & arrR(j, 35) & "';"
b_Select.Attributes("onclick") = strResult
 
Hey Guys -

Thanks for everyone who read this, the cookie was fine, it was the way I was subsequently reading it in .NET that was the problem. Thanks again for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top