Results 1 to 5 of 5

Thread: Cookies

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    43

    Cookies

    Hi

    I have vb.net code writing the cookie

    as

    Request.Cookies("TRACK")("PCODE")

    How will I get the cookie value in c#?

    Is it like Request.Cookies["TRACK"]["PCODE"]

    Cheers,
    ***learning everyday ***

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Cookies

    Wow, this is very wierd. Why? I just had the exact same issue and had to figure out, for another programmer in my department, how to read cookies in C#.

    Fortunately, one of my favorite C# websites (csharphelp.com) had an article on it.

    Take a look at this

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2002
    Posts
    43

    Re: Cookies

    Thanks for the above link

    But it did not say how it will get the value from cookie collection.

    I understand i can use

    Request.Cookies["TRACK"].Value

    but it is not really working for the vb equvalent code which i mentioned in my first post.
    ***learning everyday ***

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Cookies

    Listing 3.3 on that link shows how to read the cookie. Isn't that what you are after?

  5. #5
    Fanatic Member
    Join Date
    May 2005
    Posts
    898

    Re: Cookies

    ----never mind, incorrect----
    Last edited by grilkip; Feb 6th, 2006 at 01:07 PM.
    "so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width