I know there are topics with similar heading, but this is kinda different.
First, in order to store multiple values in a single session, I have to use a List whereas I store the list with the values in the session, right ?
If so, when I want to add a value to the List, which is already in the session, then I retrieve the List from the session and add the value. But do I need to assign the List back to the session every time I have added/removed a value from the List? Or ,by default, it gets automatically updated in the session when I manipulate it as it was assigned at first in the session and after that.
UPDATE: providing sample code of my question
public void assignNewID(int currentID)
{
if(Session["usersID"] == null)
{
Session["usersID"] = new List<int>();
}
if(currentID != null)
{
var list = (List<int>)Session["usersID"];
list.Add(currentID);
// now should I hereby assign the list back to
// the session like:
// Session["usersID"] = list;
// or it gets automatically updated in the session by default ?
}
}

Listdeclaration and the add-to-Session code.