Exemplo n.º 1
0
        /// <exception cref="WxePostbackOutOfSequenceException">
        ///   Thrown if a postback with an incorrect sequence number is handled.
        /// </exception>
        protected virtual void HandleLoadPostData(NameValueCollection postBackCollection)
        {
            ArgumentUtility.CheckNotNull("postBackCollection", postBackCollection);

            WxeContext wxeContext = WxeContext.Current;

            int postBackID = int.Parse(postBackCollection[WxePageInfo.PostBackSequenceNumberID]);

            if (postBackID != wxeContext.PostBackID)
            {
                CurrentPageStep.SetIsOutOfSequencePostBack(true);
            }

            string returningToken = postBackCollection[WxePageInfo.ReturningTokenID];

            if (!string.IsNullOrEmpty(returningToken))
            {
                WxeFunctionStateManager functionStates = WxeFunctionStateManager.Current;
                WxeFunctionState        functionState  = functionStates.GetItem(returningToken);
                if (functionState != null)
                {
                    CurrentPageStep.SetReturnState(functionState.Function, true, null);
                    _returningFunctionState = functionState;
                }
            }
        }
Exemplo n.º 2
0
 public void ExecuteFunction(WxeFunction function, Control sender, bool?usesEventTarget)
 {
     if (CurrentPageStep.UserControlExecutor.IsNull)
     {
         CurrentPageStep.ExecuteFunction(this, function, sender, usesEventTarget ?? UsesEventTarget);
     }
     else
     {
         CurrentUserControlStep.ExecuteFunction(this, function, sender, usesEventTarget ?? UsesEventTarget);
     }
 }
Exemplo n.º 3
0
 /// <summary> Returns the viewstate previously saved into the executing <see cref="WxePageStep"/>. </summary>
 /// <returns> An <b>ASP.NET</b> viewstate object. </returns>
 public object LoadPageStateFromPersistenceMedium()
 {
     return(CurrentPageStep.LoadPageStateFromPersistenceMedium());
 }
Exemplo n.º 4
0
 /// <summary> Saves the viewstate into the executing <see cref="WxePageStep"/>. </summary>
 /// <param name="state"> An <b>ASP.NET</b> viewstate object. </param>
 public void SavePageStateToPersistenceMedium(object state)
 {
     CurrentPageStep.SavePageStateToPersistenceMedium(state);
 }