Link to home
Create AccountLog in
Avatar of bmanmike39
bmanmike39

asked on

How do I update an existing cookie with more than one value (MVC4 C#)

Can't figure out how to update the cookie without rewriting all the cookies.

How would I just update the one value?

This is what I have:
HttpCookie uInfo = Request.Cookies["userInfo"];
           
                //  == 4 other values in the uerInfo cookie
                uInfo["zoneNumber"] = Zone;     // Zone is a public var
    

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Lokesh B R
Lokesh B R
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of bmanmike39
bmanmike39

ASKER

Thanks!