/// <devdoc> /// Loads the view state for the control. /// </devdoc> protected override void LoadViewState(object savedState) { if (savedState != null) { Triplet stateTriplet = (Triplet)savedState; base.LoadViewState(stateTriplet.First); if (stateTriplet.Second != null) { if (_inputAttributesState == null) { _inputAttributesState = new StateBag(); _inputAttributesState.TrackViewState(); } _inputAttributesState.LoadViewState(stateTriplet.Second); } if (stateTriplet.Third != null) { if (_labelAttributesState == null) { _labelAttributesState = new StateBag(); _labelAttributesState.TrackViewState(); } _labelAttributesState.LoadViewState(BinaryCompatibility.Current.TargetsAtLeastFramework48 ? stateTriplet.Third : stateTriplet.Second); } } }
/// <devdoc> /// Loads view state. /// </devdoc> private void LoadViewState(object savedState) { if (savedState != null) { ViewState.LoadViewState(savedState); } }
protected virtual void LoadViewState(object savedState) { if (savedState == null) { return; } object [] states = (object [])savedState; viewState.LoadViewState(states[0]); if (states[1] != null) { ((IStateManager)ControlStyle).LoadViewState(states[1]); } if (states[2] != null) { ((IStateManager)FooterStyle).LoadViewState(states[2]); } if (states[3] != null) { ((IStateManager)HeaderStyle).LoadViewState(states[3]); } if (states[4] != null) { ((IStateManager)ItemStyle).LoadViewState(states[4]); } }
internal void LoadViewState(object state) { if (state == null) { return; } object [] states = (object [])state; if (states [0] != null) { sb = new StateBag(true); sb.LoadViewState(states[0]); sb.SetDirty(true); } if (states [1] != null) { text = (string)states [1]; } if (states [2] != null) { value = (string)states [2]; } if (states [3] != null) { selected = (bool)states [3]; } if (states [4] != null) { enabled = (bool)states [4]; } }
/// <devdoc> /// Loads view state. /// </devdoc> protected virtual void LoadViewState(object savedState) { if (savedState != null) { ViewState.LoadViewState(savedState); } }
protected override void LoadViewState(object savedState) { if (savedState == null || !(savedState is Pair)) { base.LoadViewState(null); return; } Pair pair = (Pair)savedState; base.LoadViewState(pair.First); if (ViewState [System.Web.UI.WebControls.Style.BitStateKey] != null) { ControlStyle.LoadBitState(); } if (pair.Second != null) { if (attribute_state == null) { attribute_state = new StateBag(); if (IsTrackingViewState) { attribute_state.TrackViewState(); } } attribute_state.LoadViewState(pair.Second); attributes = new AttributeCollection(attribute_state); } enabled = ViewState.GetBool("Enabled", enabled); }
/// <internalonly/> /// <devdoc> /// <para>Loads previously saved state. /// Overridden to handle ViewState, Style, and Attributes.</para> /// </devdoc> protected override void LoadViewState(object savedState) { if (savedState != null) { Pair myState = (Pair)savedState; base.LoadViewState(myState.First); if (ControlStyleCreated || (ViewState[System.Web.UI.WebControls.Style.SetBitsKey] != null)) { // the style shares the StateBag of its owner WebControl // call LoadViewState to let style participate in state management ControlStyle.LoadViewState(null); } else { _webControlFlags.Set(deferStyleLoadViewState); } if (myState.Second != null) { if (attrState == null) { attrState = new StateBag(true); attrState.TrackViewState(); } attrState.LoadViewState(myState.Second); } } // Load values cached out of view state object enabled = ViewState["Enabled"]; if (enabled != null) { if (!(bool)enabled) { flags.Set(isWebControlDisabled); } else { flags.Clear(isWebControlDisabled); } _webControlFlags.Set(disabledDirty); } if (((IDictionary)ViewState).Contains("AccessKey")) { _webControlFlags.Set(accessKeySet); } if (((IDictionary)ViewState).Contains("TabIndex")) { _webControlFlags.Set(tabIndexSet); } if (((IDictionary)ViewState).Contains("ToolTip")) { _webControlFlags.Set(toolTipSet); } }
protected override void LoadViewState(object savedState) { if (savedState == null) { base.LoadViewState(null); return; } Triplet saved = (Triplet)savedState; base.LoadViewState(saved.First); if (saved.Second != null) { if (inputAttributesState == null) { inputAttributesState = new StateBag(true); inputAttributesState.TrackViewState(); } inputAttributesState.LoadViewState(saved.Second); } if (saved.Third != null) { if (labelAttributesState == null) { labelAttributesState = new StateBag(true); labelAttributesState.TrackViewState(); } labelAttributesState.LoadViewState(saved.Third); } }
/// <devdoc> /// Loads the view state for the control. /// </devdoc> protected override void LoadViewState(object savedState) { if (savedState != null) { Triplet stateTriplet = (Triplet)savedState; base.LoadViewState(stateTriplet.First); if (stateTriplet.Second != null) { if (_inputAttributesState == null) { _inputAttributesState = new StateBag(); _inputAttributesState.TrackViewState(); } _inputAttributesState.LoadViewState(stateTriplet.Second); } if (stateTriplet.Third != null) { if (_labelAttributesState == null) { _labelAttributesState = new StateBag(); _labelAttributesState.TrackViewState(); } _labelAttributesState.LoadViewState(stateTriplet.Second); } } }
protected virtual void LoadViewState(object savedState) { object[] pieces = savedState as object[]; if (pieces == null) { return; } if (pieces[0] != null) { viewstate.LoadViewState(pieces[0]); } if (pieces[1] != null) { FooterStyle.LoadViewState(pieces[1]); } if (pieces[2] != null) { HeaderStyle.LoadViewState(pieces[2]); } if (pieces[3] != null) { ItemStyle.LoadViewState(pieces[3]); } }
public void IStateManager_Deny_Unrestricted() { IStateManager sm = new StateBag(); Assert.IsFalse(sm.IsTrackingViewState, "IsTrackingViewState"); object state = sm.SaveViewState(); sm.LoadViewState(state); sm.TrackViewState(); }
void IStateManager.LoadViewState(object savedState) { if (savedState == null) { return; } object[] states = (object[])savedState; ViewState.LoadViewState(states [0]); if (states [1] != null) { ((IStateManager)ChildItems).LoadViewState(states [1]); } }
protected virtual void LoadViewState(object savedState) { if (savedState == null) { return; } object[] states = (object[])savedState; ViewState.LoadViewState(states [0]); if (tree != null && SelectedFlag) { tree.SetSelectedNode(this, true); } if (!PopulateOnDemand || Populated) { ((IStateManager)ChildNodes).LoadViewState(states [1]); } }
protected virtual void LoadViewState(object savedState) { viewState.LoadViewState(savedState); }
void IStateManager.LoadViewState(object savedState) { ViewState.LoadViewState(savedState); }
internal void LoadViewState (object state) { if (state == null) return; object [] states = (object []) state; if (states [0] != null) { sb = new StateBag (true); sb.LoadViewState (states[0]); sb.SetDirty (true); } if (states [1] != null) text = (string) states [1]; if (states [2] != null) value = (string) states [2]; if (states [3] != null) selected = (bool) states [3]; if (states [4] != null) enabled = (bool) states [4]; }
void IStateManager.LoadViewState(object state) { _bag.LoadViewState(state); }
protected internal void LoadViewState(object state) { viewstate.LoadViewState(state); LoadBitState(); }