code_junkie

What are the common issues and best practices when using ASP.NET session state?

Nov 12th, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Dim sessionObj As Object = CType(Session("SessionKey"), Object)
  2. If sessionObj Is Nothing
  3. sessionObj = ReCreateObj()
  4. Session("SessionKey") = sessionObj
  5. End If
  6.  
  7. object sessionObj = Session["SessionKey"] as object ;
  8. if(sessionObj == null)
  9. {
  10. sessionObj = ReCreateObj();
  11. Session["SessionKey"] = sessionObj;
  12. }
Add Comment
Please, Sign In to add comment