c# - .Net Session Scoped Variables? -


i'm new in .net , i'm using mvc2 + linq , c#

i want know if possible use session scoped variables or clases , how that? need store in session object ? or declare global variable ?

i need store data diferent sql tables associates logged in user

thanks in advance

yes, should able use session object within controller's action methods store , retrieve session data.

session["mydata"] = mydata; mydatatype mydata = (mydatatype)session["mydata"]; 

obviously careful size of objects storing , how session data handled i.e. in process, sql server or application server. if not storing session data in memory need ensure serializable.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -