About Session Variable

Posted by Abhi_patil under ASP.NET on 4/8/2009 | Views : 1226 | Status : [Member] | Replies : 1
Will it be problematic if i used many session variable in complete project?.
currently i am facing that prblem. i get error "null references " for session variables.
this error comes only for session variables and infrequently. that means some time it comes , some time not.
why it is so?
plz reply.


Posted by: Vuyiswamb on: 4/9/2009 [Member] [MVP] [Administrator] NotApplicable

Good Morning Abhi_patil

It will be not Problematic to use many Sessions in your Project. Remember that the Life time of a Session Depends on your Project. Meaning that as long as your project runs , the session will still be carrying the value until you abondon it or untill you close your application, now it is very usefull and good Practise to check your session for Nulls before you use them, Becarefull with the names of the Sessions, because in some cases you might try to access the session that does not exist.

Thank you for Posting in DotnetFunda

Were are looking forward for your reply

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response