This is MY blog. The views represented here are not in relation to anybody else. Please read my full disclaimer for a more complete disclaimer.
Recently I needed to display all Session Variables when a crash would happen. A crash would happen and I have this website I was working on send me an email with the stack trace and now the session variables. However I wasn't aware of how to list all session variables, so I went to my friend Google and came up with the following code:
string strSessions; for(int i=0;i<Session.Count;i++) { strSessions += Session.Keys[i].ToString() + " - " + Session[i].ToString() + Environment.NewLine; }
Works like a champ!
HT: davidj.org
Related posts