Make sure that the CodeBehind and Inherits attributes of the ‘<%@ Page’ declaration in your asp file refer to the right class. It’s easy to get this wrong if you copy/pasted an aspx/aspx.cs pair intending to adapt them.
Tag Archives: ASP.NET
Request.Cookies == Response.Cookies in ASP.NET
Be careful when setting a Response.Cookies property that you don’t need to check the same property in Request.Cookies later while processing the same http session, because these collections reference the same object, so changing one immediately overwrites the value in the other.