/// <summary>Executes the <paramref name="function"/> in the current window without triggering the current post-back event on returning.</summary> /// <remarks>This overload tries to determine automatically whether the current event was caused by the <c>__EVENTTARGET</c> field.</remarks> /// <include file='..\..\doc\include\ExecutionEngine\WxePageExtensions.xml' path='WxePageExtensions/ExecuteFunctionNoRepost/param[@name="page" or @name="function" or @name="sender" or @name="createPermaUrl" or @name="useParentPermaUrl" or @name="permaUrlParameters"]' /> public static void ExecuteFunctionNoRepost( this IWxePage page, WxeFunction function, Control sender, bool createPermaUrl, bool useParentPermaUrl, NameValueCollection permaUrlParameters) { var permaUrlOptions = CreatePermaUrlOptions(createPermaUrl, useParentPermaUrl, permaUrlParameters); var options = new WxeCallOptionsNoRepost(permaUrlOptions); var arguments = new WxeCallArguments(sender, options); Execute(page, function, arguments); }
public void ExecuteFunctionNoRepost(WxeFunction function, Control sender, WxeCallOptionsNoRepost options) { ArgumentUtility.CheckNotNull("function", function); ArgumentUtility.CheckNotNull("sender", sender); ArgumentUtility.CheckNotNull("options", options); bool usesEventTarget = options.UsesEventTarget ?? UsesEventTarget; WxePermaUrlOptions permaUrlOptions = options.PermaUrlOptions; WxeRepostOptions repostOptions = WxeRepostOptions.SuppressRepost(sender, usesEventTarget); _wxePageInfo.CurrentPageStep.ExecuteFunction(new PreProcessingSubFunctionStateParameters(_page, function, permaUrlOptions), repostOptions); }