public void Set(string key, object value) { IDictionary <string, object> temp = new Dictionary <string, object>(); if (SessionStorage.ContainsKey(SessionId)) {//当前session中已经存在 temp = SessionStorage[SessionId]; if (temp.ContainsKey(key)) { temp[key] = value; } else { temp.Add(key, value); } } else {//session中 没有当前盒子 temp.Add(key, value); SessionStorage.Add(SessionId, temp); } }