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

    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.

  2. #2
    Join Date
    Jan 2004

    Never mind

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

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.