//如果刷新IsRefresh = true                            
  private bool _isRefresh;
  private bool _refreshState;
  public bool IsRefresh
  {
   get
   {
    return _isRefresh;
   }
  }

 
  protected override void LoadViewState(object savedState)
  {
   object[] allStates = (object[]) savedState;
   base.LoadViewState(allStates[0]);
   _refreshState = (bool) allStates[1];
   _isRefresh = _refreshState == (bool) Session["__ISREFRESH"];
  }

  protected override object SaveViewState()
  {
   Session["__ISREFRESH"] = _refreshState;
   object[] allStates = new object[2];
   allStates[0] = base.SaveViewState();
   allStates[1] = !_refreshState;
   return allStates;
  }

 

posted on 2005-08-25 13:38  try  阅读(356)  评论(0编辑  收藏  举报