Would you like to react to this message? Create an account in a few clicks or log in to continue.

HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  


 Session State in C#

Go down 


Number of posts : 228
Age : 40
Registration date : 2007-03-05

Session State in C# Empty
PostSubject: Session State in C#   Session State in C# EmptyThu Mar 15, 2007 2:01 pm

Assign and Retrieve Session

//Assign a value to the myvariable session variable.
Session["myvariable"] = "somevalue";

//Retrieve the value of the myvariable session variable.
string myString;
if (Session["myvariable"] != null)
myString = (string)Session["myvariable"];
Back to top Go down
Session State in C#
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Programming Languages :: C#-
Jump to: