示例#1
0
        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);
        }
示例#2
0
        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);
            }
        }