I need some help creating the necessary Javascript to add values to an existing cookie. I know how to do it in c#, but it needs to be done in Javascript in this scenario.
This is the C# Code:
HttpCookie myCookie = HttpContext.Current.Request.Cookies["SiteSettings"];
myCookie.Values.Add(varName, varValue);
myCookie.Expires = DateTime.Now.AddYears(1);
HttpContext.Current.Response.Cookies.Add(myCookie);
Can anyone help me convert this to Javascript? I've searched high and low on the internet, and most tutorials don't have a way of specifying the cookie (this site has more than one cookie).
Thank you very much, Andrew