Re: Extracting String Info from WebRequest Cookie
From: Joerg Jooss (joerg.jooss_at_gmx.net)
Date: 09/10/04
- Next message: Bikhod: "XML documentation - problems with lists"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Is it possible to call C# code from C++ ?"
- In reply to: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Next in thread: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Reply: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Reply: Joerg Jooss: "Re: Extracting String Info from WebRequest Cookie"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 15:42:54 +0200
James Johnson wrote:
> Well, I have discovered that all you have to do to reference a cookie
> in a cookie collection is to provide an index directly to the cookie
> collection such as:
>
> Cookie cookie = myCookieColl[0];
If you're coming from VB.NET: You don't use the Item property in C#.
Instead, you access an item within a collection using the [] operator (aka
indexer), similar to accessing array items.
In additon to accessing a cookie by index, you can also access it by name.
Cookie cookie = myCookieColl["DeliciousCookie"];
> However, I still face the problem of the cookie.Value being encoded.
> Is it bytes? Is it encrypted? How do you deal with the value and
> decode it?
Cookie.Value delivers the value "as is". You have to check with the
server-side application developers how they encoded or encrypted the
value -- chances are, they're not going to tell you ;-)
Cheers,
-- Joerg Jooss joerg.jooss@gmx.net
- Next message: Bikhod: "XML documentation - problems with lists"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Is it possible to call C# code from C++ ?"
- In reply to: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Next in thread: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Reply: James Johnson: "Re: Extracting String Info from WebRequest Cookie"
- Reply: Joerg Jooss: "Re: Extracting String Info from WebRequest Cookie"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|