Session State

Steve talks about how we can make more efficient use of the Session state in ASP.NET.

It’s something that we as developers should try to follow as a guideline. The idea is to use a private SessionState object (struct) which has fields for each property you need to store in the session. This way you don’t need to use ugly strings when setting/accessing session variables and you get the advantage of the compiler doing early-bound checks for you.

Written on November 28, 2003