public void IStateManager_Deny_Unrestricted () { IStateManager sm = new StateBag (); Assert.IsFalse (sm.IsTrackingViewState, "IsTrackingViewState"); object state = sm.SaveViewState (); sm.LoadViewState (state); sm.TrackViewState (); }
protected override void LoadViewState(object savedState) { if (savedState != null) { Pair p = (Pair)savedState; base.LoadViewState(p.First); if (p.Second != null) { EnsureAttributes(); attrBag.LoadViewState(p.Second); } } }
protected override void LoadViewState(object savedState) { if (savedState != null) { Pair myState = (Pair)savedState; base.LoadViewState(myState.First); if (myState.Second != null) { if (attributeStorage == null) { attributeStorage = new StateBag(true); attributeStorage.TrackViewState(); } attributeStorage.LoadViewState(myState.Second); } } }