Example #1
0
        public void SaveState(
            IDictionary <string, object> persistentStateDictionary,
            IDictionary <string, object> transientStateDictionary)
        {
            EnsureStateAttributesRead();

            var args = new StateSaveEventArgs(
                persistentStateDictionary,
                transientStateDictionary);

            OnStateSaving(args);

            viewState?.SavePersistentState(persistentStateDictionary);
            viewState?.SaveTransientState(transientStateDictionary);

            OnStateSaved(args);
        }
Example #2
0
 protected virtual void OnStateSaved(StateSaveEventArgs e)
 {
     StateSaved?.Invoke(this, e);
 }