Esempio n. 1
0
 private void SaveStateData()
 {
     ViewState["mystate"] = new CounterControlState
     {
         LeftValue  = this.LeftValue,
         RightValue = this.RightValue,
     };
 }
Esempio n. 2
0
        protected override void LoadControlState(object savedState)
        {
            CounterControlState state = savedState as CounterControlState;

            if (state != null)
            {
                LeftValue  = state.LeftValue;
                RightValue = state.RightValue;
            }
        }
Esempio n. 3
0
        private void SaveStateData()
        {
            ViewState["mystate"] = new CounterControlState
            {
                LeftValue  = this.LeftValue,
                RightValue = this.RightValue
            };

            //Session[GetSessionKey("left")] = LeftValue;
            //Session[GetSessionKey("right")] = RightValue;
        }
Esempio n. 4
0
        private void LoadStateData()
        {
            CounterControlState state = ViewState["mystate"] as CounterControlState;

            if (state != null)
            {
                LeftValue  = state.LeftValue;
                RightValue = state.RightValue;
            }

            //int temp;
            //if (int.TryParse(GetValue("left"), out temp))
            //{
            //    LeftValue = temp;
            //}
            //if (int.TryParse(GetValue("right"), out temp))
            //{
            //    RightValue = temp;
            //}
        }
Esempio n. 5
0
        private void LoadStateData()
        {
            CounterControlState state = ViewState["mystate"] as CounterControlState;

            if (state != null)
            {
                LeftValue  = state.LeftValue;
                RightValue = state.RightValue;
            }

            #region
            //Int32 temp;
            //if (Int32.TryParse(GetValue("left"), out temp))
            //{
            //    LeftValue = temp;
            //}
            //if (Int32.TryParse(GetValue("right"), out temp))
            //{
            //    RightValue = temp;
            //}
            //LeftValue = (Session[GetSessionKey("left")] as Int32?) ?? LeftValue;
            //RightValue = (Session[GetSessionKey("reight")] as Int32?) ?? RightValue;
            #endregion
        }