The
Page
class has a property called
Session
that is an instance of the
HttpSessionState
class.
You can use this object to store information specific to the currently logged in user. On a high level, each logged in user has a separate instance of this object, so you can use something like this:
To store information to session"
Session["UserName"] = txtUserName.Text;
To read session information:
string userName = Session["UserName"].ToString();
This[
^] article will get you started on using sessions.