Re: Cookies C#
- From: "Matt Jensen" <newsgrouponly@xxxxxxxxxxxxx>
- Date: Fri, 29 Jul 2005 13:36:15 +0100
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.
>>
>
>
.
- References:
- Cookies C#
- From: Matt Jensen
- Re: Cookies C#
- From: Mark Rae
- Re: Cookies C#
- From: Matt Jensen
- Cookies C#
- Prev by Date: Re: ASP.NET version 2.0, quick questions
- Next by Date: Re: dim H43 as string
- Previous by thread: Re: Cookies C#
- Next by thread: Q: calendar pop-up
- Index(es):
Relevant Pages
|