ASP.NET state management with style (and attributes) 
 If you like what this code does for you, you can keep it. The comments should be good enough, so I just post this as-is instead of a lengthy blurb. Here's a teaser:  
         public class MyPage : StateManagingPage          {              [PersistentPageState] public int pageVisitsEver;              [SessionPageState] public int pageVisitsThisSession;              [TransientPageState] public int roundtripsThisPage;                        /* omissions... */                       private void Page_Load(object sender, System.EventArgs e)              {                   pageVisitsEver++;                   pageVisitsThisSession++;                   roundtripsThisPage++;                          }                         }
  Enjoy!  
      10:03:29 PM       
       |