/// <summary> /// Saves any state that was modified after the TrackViewState method was invoked /// 在SaveViewState之前,将ViewState中所有IStateManager类型项转换为可序列化的ViewSateItemInternal类型项 /// 以及在SaveViewState之后,将ViewState中所有ViewSateItemInternal类型项恢复成IStateManager类型项 /// </summary> /// <returns>返回服务器控件的当前视图状态</returns> /// <remarks> /// Saves any state that was modified after the TrackViewState method was invoked /// 并在SaveViewState之前,将ViewState中所有IStateManager类型项转换为可序列化的ViewSateItemInternal类型项 /// 以及在SaveViewState之后,将ViewState中所有ViewSateItemInternal类型项恢复成IStateManager类型项 /// </remarks> protected override object SaveViewState() { WebControlUtility.PreSaveViewState(ViewState); object o = base.SaveViewState(); WebControlUtility.AfterSavedViewState(ViewState); return(o); }