コード例 #1
0
        /// <summary>
        /// Restores view-state information from a previous request that was saved with the SaveViewState method.
        /// 并在LoadViewState之前缓存ViewState中所有IStateManager类型项
        /// 以及在LoadViewState之后从缓存中恢复将ViewState中ViewSateItemInternal类型项恢复成IStateManager类型项
        /// </summary>
        /// <param name="savedState">An object that represents the control state to restore.</param>
        protected override void LoadViewState(object savedState)
        {
            StateBag backState = ViewState.PreLoadViewState();

            base.LoadViewState(savedState);
            ViewState.AfterLoadViewState(backState);
        }