Re: Cookies C#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Request.Cookies["username"]["username"]
worked!

"Matt Jensen" <newsgrouponly@xxxxxxxxxxxxx> wrote in message
news:eIFotlDlFHA.4028@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks a lot Mark
>
> I considered that option, however I thought there must be a simpler way
> because it seems like a bit of a kludge, I thought that surely you can get
> the value part of the name/value pair somehow?
>
> You could do it in classic ASP, just getting the 'subkey' value of the
> cookie eg. Request.Cookies("username")("username")
>
> I'll see what I can find out
> Matt
>
> "Mark Rae" <mark@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:OzeZQYDlFHA.2608@xxxxxxxxxxxxxxxxxxxxxxx
>> "Matt Jensen" <newsgrouponly@xxxxxxxxxxxxx> wrote in message
>> news:eLNp1TDlFHA.3756@xxxxxxxxxxxxxxxxxxxxxxx
>>
>>> Howdy, if I set a cookie via say SetCookie("username", "test" ,30)
>>>
>>> and then try to get the value using GetCookie("username")
>>> the value returned is username=test
>>> when I actually just want test.
>>>
>>> How do I get this, or what am I doing wrong?
>>
>> That's just how a cookie is structured - just separate the name part from
>> the value part and keep the value part. You could use Split() to convert
>> the cookie into a string array, or just use Substring to return
>> everything after the equals sign.
>>
>
>


.



Relevant Pages

  • Re: webtrendsalive
    ... "Mark L. Ferguson" wrote: ... The cookie monster has a setting to turn them off in IE, Tools, Privacy tab. ... However deleting the statse entry still ... After deleting the cookie, searching the registry again ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: webtrendsalive
    ... Again thanks Mark but my mind is now starting to boggle -what's new! ... However deleting the statse entry still produced ... the cookie when going on line again but not before. ... statse in the whole registry produced another entry which which I also ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: attempts to download office home free trial download
    ... IE, tools menu, options, Privacy tab, allow that kind of cookie. ... Mark L. Ferguson ... when entering thr required information on the registration for free ... the registration screen reappears, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: IE7 Is there anyway to backup my home page?
    ... All that stuff you configure on the msn home page is stored in a 'cookie'. ... You could save and restore the cookie the next time, when you rebuild the live page, and then it is corrupted. ... "Mark L. Ferguson" wrote: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: webtrendsalive
    ... Mark L. Ferguson ... The cookie concerned was cecil@xxxxxxxxxxxxxxxxxxxxx,com ... Registry - I can easily remove the cookie but have been told I need to ...
    (microsoft.public.windowsxp.help_and_support)