protected override object SaveViewState() { var r = base.SaveControlState(); var p = PersistantStateMetaData.Get(GetType()); if (!p.IsEmpty) { r = new Pair(r, p.SaveStateFor(this)); } return(r); }
protected override void LoadViewState(object savedState) { var p = PersistantStateMetaData.Get(GetType()); if (p.IsEmpty) { base.LoadViewState(savedState); } else { var d = (Pair)savedState; base.LoadViewState(d.First); p.LoadStateFor(this, d.Second); } }