The session is updated because the variable testStudent is equal to the list in Session["StudentData"]. That is the first statement in you're code : List<student> testStudent = Session["StudentData"] as List<student>;
Remember these are all reference types. So testStudent == Session["StudentData"]. Equally all objects in Session["StudentData"] are in testStudent.
When it is you're goal to change the objects in testStudent list without changing the session, you must clone the objects before add them to a new list, the testStudent list;
To achieve that derive you're Student class from ICloneble and add the following extension class to you're project.
static class Extensions
{
public static IList<t> Clone<t>(this IList<t> listToClone) where T: ICloneable
{
return listToClone.Select(item => (T)item.Clone()).ToList();
}
}
</t></t></t>
the first statement in you code can the be:
IList<student> testStudent = Session.Clone<student>();
</student></student>