Thursday, July 2, 2015

ASP .NET and Cookies

Recently I found out something rather cool about Request and Response cookies in ASP .NET. The basics of cookie management in ASP .Net are that the cookie gets read in the Request.Cookies collection and written in the Response.Cookies collection. However, did you know that as soon as you as you write a cookie out in the response, it is automatically available in the request? I didn’t, and when I worked it out I thought it was rather cool, and thought I would share.