public void RegisterRequiresControlState(Control control)
 {
     if (control == null)
     {
         throw new ArgumentException(System.Web.SR.GetString("Page_ControlState_ControlCannotBeNull"));
     }
     if (control.ControlState == ControlState.PreRendered)
     {
         throw new InvalidOperationException(System.Web.SR.GetString("Page_MustCallBeforeAndDuringPreRender", new object[] { "RegisterRequiresControlState" }));
     }
     if (this._registeredControlsRequiringControlState == null)
     {
         this._registeredControlsRequiringControlState = new ControlSet();
     }
     if (!this._registeredControlsRequiringControlState.Contains(control))
     {
         this._registeredControlsRequiringControlState.Add(control);
         IDictionary controlState = (IDictionary) this.PageStatePersister.ControlState;
         if (controlState != null)
         {
             string uniqueID = control.UniqueID;
             if (!this.ControlStateLoadedControlIds.Contains(uniqueID))
             {
                 control.LoadControlStateInternal(controlState[uniqueID]);
                 this.ControlStateLoadedControlIds.Add(uniqueID);
             }
         }
     }
 }