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]); } }
protected override void LoadViewState(object savedState) { object[] state = (object[])savedState; base.LoadViewState(state [0]); if (state [1] != null) { ItemStyle.LoadViewState(state [1]); } if (state [2] != null) { SelectedItemStyle.LoadViewState(state [2]); } if (state [3] != null) { AlternatingItemStyle.LoadViewState(state [3]); } if (state [4] != null) { EditItemStyle.LoadViewState(state [4]); } if (state [5] != null) { SeparatorStyle.LoadViewState(state [5]); } if (state [6] != null) { HeaderStyle.LoadViewState(state [6]); } if (state [7] != null) { FooterStyle.LoadViewState(state [7]); } #if NET_2_0 if (state [8] != null) { ControlStyle.LoadViewState(state [8]); } #endif }