April 21st, 2004, 03:02 PM
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.
April 21st, 2004, 03:06 PM
never mind, I overlooked the "set" method. Doh!!!!!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!