Using Cookie in Asp.Net Mvc 4
Try using Response.SetCookie(), because Response.Cookies.Add() can cause multiple cookies to be added, whereas SetCookie will update an existing cookie.
Try using Response.SetCookie(), because Response.Cookies.Add() can cause multiple cookies to be added, whereas SetCookie will update an existing cookie.
If we set the cookie to path ‘/subfolder1’, will the cookie will be made available to any page or subfolder beneath the folder? Yes. The cookie will be available to all pages and subdirectories within the /subfolder1 path.