Exemplo n.º 1
0
 internal void SetDirty()
 {
     foreach (string key in ViewState.Keys)
     {
         ViewState.SetItemDirty(key, true);
     }
 }
Exemplo n.º 2
0
        internal void SetDirty()
        {
            StateBag vs = ViewState;

            foreach (string key in vs.Keys)
            {
                vs.SetItemDirty(key, true);
            }
        }
Exemplo n.º 3
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 ///
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <history>
 ///     [jbrinkman]     5/6/2004        Created
 /// </history>
 /// -----------------------------------------------------------------------------
 internal void SetDirty()
 {
     if ((_state != null))
     {
         foreach (string key in _state.Keys)
         {
             _state.SetItemDirty(key, true);
         }
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Internal method to mark the statebag as dirty so it can be resaved if necessary
 /// </summary>
 internal void SetDirty()
 {
     if (null != _viewState)
     {
         foreach (string key in _viewState.Keys)
         {
             _viewState.SetItemDirty(key, true);
         }
     }
 }
Exemplo n.º 5
0
 public void SetDirty()
 {
     if (viewState != null)
     {
         var keys = viewState.Keys;
         foreach (string key in keys)
         {
             viewState.SetItemDirty(key, true);
         }
     }
 }
Exemplo n.º 6
0
 internal void SetDirty()
 {
     if (_viewState != null)
     {
         ICollection Keys = _viewState.Keys;
         foreach (string key in Keys)
         {
             _viewState.SetItemDirty(key, true);
         }
     }
 }
Exemplo n.º 7
0
 /// <summary>
 ///
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <history>
 ///     [jbrinkman]	5/6/2004	Created
 /// </history>
 internal void SetDirty()
 {
     if (_state != null)
     {
         string key;
         foreach (string tempLoopVar_key in _state.Keys)
         {
             key = tempLoopVar_key;
             _state.SetItemDirty(key, true);
         }
     }
 }
Exemplo n.º 8
0
        public void Deny_Unrestricted()
        {
            StateBag bag = new StateBag(true);

            Assert.IsNotNull(bag.Add("key", "value"), "Add");
            Assert.AreEqual(1, bag.Count, "Count");
            Assert.IsNotNull(bag.GetEnumerator(), "GetEnumerator");
            bag.SetItemDirty("key", true);
            Assert.IsTrue(bag.IsItemDirty("key"), "IsItemDirty");
            bag.Remove("key");

            bag.Clear();
            bag["key"] = "value";
            Assert.IsNotNull(bag["key"], "this[string]");
            Assert.IsNotNull(bag.Keys, "Keys");
            Assert.IsNotNull(bag.Values, "Values");
            bag.SetDirty(true);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Mark all properties on the image area as dirty.
        /// </summary>
        /// <remarks>This property is useful for dynamically created image areas.  By calling this method, you
        /// can mark all properties as dirty to force them to get stored in view state.  By doing this, the area
        /// can be created once at the initial page load and then recreated on post backs entirely from view
        /// state.</remarks>
        public void MarkAsDirty()
        {
            if (!this.IsTrackingViewState)
            {
                this.TrackViewState();
            }

            foreach (string s in viewState.Keys)
            {
                viewState.SetItemDirty(s, true);
            }

            if (attrState != null)
            {
                foreach (string s in attrState.Keys)
                {
                    attrState.SetItemDirty(s, true);
                }
            }
        }
 public void SetItemDirty(string key, bool dirty)
 {
     viewState.SetItemDirty(key, dirty);
 }