private void RemoveDataFromSession(string key) { HttpSessionState session = HttpContextHelper.SafeGetSession(); if (session != null) { session.Remove(key); } else if (_InternalStorage.ContainsKey(key)) { _InternalStorage.Remove(key); } }
private void SetDataInSession(string key, object value) { HttpSessionState session = HttpContextHelper.SafeGetSession(); if (session != null) { session[key] = value; } else { _InternalStorage[key] = value; } }
private object GetDataFromSession(string key) { HttpSessionState session = HttpContextHelper.SafeGetSession(); if (session != null) { return(session[key]); } else if (_InternalStorage.ContainsKey(key)) { return(_InternalStorage[key]); } else { return(null); } }