Datatypes: HTTPCookie and Strings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know if it is possible to change the datatype of a string into an
HTTPCookie?

I tried CType and it would not let me do it.
 
Paul said:
Does anyone know if it is possible to change the datatype of a string into an
HTTPCookie?

I tried CType and it would not let me do it.

No, you can't do that. You have to create a new HttpCookie object and
put the string into it. A cookie needs two string values, a name and a
value, so unless you want to use your string both as name and value
(which is rather pointless), you need another string to create the
cookie object.
 
Would it be possible to put the string directly into a CookieContainer?
 
CookieContainer Contains Cookies
Create a Cookie then Hydrate it with name value pair(s) then place that
newly created cookie in the CookieContainer.

Are you talking about serialized cookie as a string?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top