M
Mark
Hi All
I'm trying to add a dictionary object and a stack (C#) to the Session
state as follows:
//Create Dictonary object and add 1 kvp
Dictionary<String, String> dicDonation = new Dictionary<String,
String>();
dicDonation.Add("strVar1", "strValue1");
//Create Stack object and add 1 kvp
Stack<String> PQStack = new Stack<String>();
PQStack.Push("donations");
//Commit objects to Session state
Session["Donations"] = dicDonation;
Session["PQStack"] = PQStack;
Session["test1"] = "Test1";
Session["test2"] = "Test2";
I added some simple test strings at the bottom as well. When I step
through this in debug mode, I can see the Donations dictionary added to
Session. But, when PQStack is added Donations is immediately removed.
The next test strings work the same way; test1 pushes PQStack out, then
test2 pushes test1 out. Bottom line is I'm only ever left with the
last kvp I put in Session. Any ideas?
Thanks
Mark
I'm trying to add a dictionary object and a stack (C#) to the Session
state as follows:
//Create Dictonary object and add 1 kvp
Dictionary<String, String> dicDonation = new Dictionary<String,
String>();
dicDonation.Add("strVar1", "strValue1");
//Create Stack object and add 1 kvp
Stack<String> PQStack = new Stack<String>();
PQStack.Push("donations");
//Commit objects to Session state
Session["Donations"] = dicDonation;
Session["PQStack"] = PQStack;
Session["test1"] = "Test1";
Session["test2"] = "Test2";
I added some simple test strings at the bottom as well. When I step
through this in debug mode, I can see the Donations dictionary added to
Session. But, when PQStack is added Donations is immediately removed.
The next test strings work the same way; test1 pushes PQStack out, then
test2 pushes test1 out. Bottom line is I'm only ever left with the
last kvp I put in Session. Any ideas?
Thanks
Mark