I’m new in .net and i’m using
MVC2 + linQ and C#
I want to know if is possible to use session scoped variables or clases and how to do that?
Do i Need to store it in a session object ? or just to declare a global variable ?
I need this to store data from diferent sql tables associates to the logged in user
Thanks in advance
Yes, you should be able to use the Session object from within your Controller’s action methods to store and retrieve session data.
Obviously be careful with the size of objects you are storing and how Session data is handled i.e. in process, SQL Server or application server. If you are not storing your session data in memory then you will need to ensure that it is serializable.