CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    28

    Question Multi-Value cookies in ASP.Net

    I am trying to set a multi-value cookie in my C# codebehind. All the docs seem to say the ASP format to set a cookie will work.

    Response.Cookies("Level1")("Slot2") = myvalue;

    but will not compile in my codebehind, it says it denotes a property where a method was expected. Not understanding what it wants from the methods of "Cookies" and the examples all showing this is the way to do it. I then tried

    HttpCookie Cookie = new HttpCookie("Level1");
    Cookie.Values("Slot2") = myvalue;
    Response.Cookies.Add( Cookie );

    of which the compiler gives the same error on the Cookies.Values line.

    Any help is appreciated.
    Nemo99

  2. #2
    Join Date
    Jan 2004
    Posts
    28

    Never mind

    never mind, I overlooked the "set" method. Doh!!!!!
    Nemo99

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

Featured