posted 6/23/2009 by Vijendra Shakya
Asp.net provides Session for storing data that is unique for the individual user.Session is stores on the server side.
Storing data in session://Storing first Name in Session like:
Session ["firstName "] = txtFirstName.Text;
Retrieve data from session:
first check the session is variable is null or not.if (Session["firstName "] != null) { //Retrieving firstName from Session litWelcome.Text = "Welcome: " + Session["firstName"]; } else { //Do something else }
When we assign a value in the session then we can use that session value anywhere in the application.
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18