I have also dealt with this in the past and first treated the string as a list with a delimeter of '&' and then treated each subsequent element of the list as another list with a delimeter of '='. This allowed quick extraction of the name value pairs in just a few lines of code.
Hope this helps, Tom -----Original Message----- From: John Ivanoff [mailto:[EMAIL PROTECTED] Sent: Friday, November 12, 2004 9:06 AM To: [EMAIL PROTECTED] Subject: Re: Cookie Issues... should read? NeedUpdate = 0 Recognition = Support EntityID = 0000000001 AgentName = Neal Bailey Rank = 100 AgentNumber = 5555 & is the delimiter so i guess break it into substrings and then get the name and value from the substring. then make them varibles. hth (really, i am doing some work today) On Fri, 12 Nov 2004 10:50:08 -0600, Bailey, Neal <[EMAIL PROTECTED]> wrote: > > > > Hey guys... > > > > I am having Cookie issues... I have a cookie that's written using ASP to > store some info in kind of an array. I am trying to read that same > cookie using Coldfusion but I can't seem to get it to output the way I > need it. I can read the cookie but it's all strung together with "=" and "&"s. I need a way > to parse the cookie and save it as a session variable. > > > > When I do a regular cookie request my string looks like this: > > "NeedUpdate=0&Recognition=Support&EntityID=0000000001&AgentName=Neal > Bailey&Rank=100&AgentNumber=5555" > > > > Any suggestions how I can read the cookie and restructure it in a way > that I can use? Thanks. > > > > > > Here is the code that makes the cookie in ASP. > > > > ' Response.Clear > > agUser = RSAgent("AgentNumber") > > Response.Cookies("RSAgent")("AgentNumber") = > RSAgent("AgentNumber") > > Response.Cookies("RSAgent")("AgentName") = > RTrim(RSAgent("AgentFirst"))+ > > " " + RTrim(RSAgent("AgentLast")) > > Response.Cookies("RSAgent")("Rank") = RSAgent("CurrentRank") > > Response.Cookies("RSAgent")("Recognition") = > RTrim(RSAgent("Recognition")) > > Response.Cookies("RSAgent")("EntityID") = RSAgent("EntityID") > > Response.Cookies("RSAgent")("NeedUpdate") = > RSAgent("NeedUpdate") > > Response.Cookies("RSAgent").Path="/" > > > > > > > > Thanks... > > > Neal Bailey > > ---------------------------------------------------------- To post, send email to [EMAIL PROTECTED] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm ---------------------------------------------------------- To post, send email to [EMAIL PROTECTED] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm
