Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I found the solution to this issue and posted it here: <a href="http://forums.asp.net/t/1554406.aspx" rel="nofollow">http://forums.asp.net/t/1554406.aspx</a> This post had the answer I was looking for: <a href="http://lionsden.co.il/codeden/?p=137&amp;cpage=1#comment-143" rel="nofollow">http://lionsden.co.il/codeden/?p=137&amp;cpage=1#comment-143</a></p> <blockquote> <p><strong>What is Page_BlockSubmit</strong></p> <p>When the user clicks on a button causing a full post back, after running Page_ClientValidate ASP.NET runs another built in function ValidatorCommonOnSubmit. Within Page_ClientValidate, Page_BlockSubmit is set based on the validation. The postback is then blocked in ValidatorCommonOnSubmit if Page_BlockSubmit is true. No matter what, at the end of the function Page_BlockSubmit is always reset back to false.</p> <p>If a page does a partial postback without running any validation and Page_BlockSubmit has not been reset to false, the partial postback will be blocked. In essence the above function, RunValidation, acts similar to ValidatorCommonOnSubmit. It runs the validation and then returns false to block the postback if needed. Since the built in postback is never run, we need to reset Page_BlockSubmit manually before returning the validation result.</p> </blockquote> <p>After Page_ClientValidate is called, the variable Page_BlockSubmit gets set to true, which blocks the autopost back. Page_BlockSubmit was getting reset to false on the second click, for reasons I still don't fully understand. I'm looking more into this, but I have a solution and I'm under the gun so I'm rolling with it.</p> <p>In summary, I previously had the following code:</p> <pre><code>for( var i = 0; i &lt; Page_ValidationSummaries.length; i++ ) Page_ClientValidate( Page_ValidationSummaries[i].validationGroup.toString() ); </code></pre> <p>By adding <code>Page_BlockSubmit = false</code> below that, I get this:</p> <pre><code>for( var i = 0; i &lt; Page_ValidationSummaries.length; i++ ) Page_ClientValidate( Page_ValidationSummaries[i].validationGroup.toString() ); Page_BlockSubmit = false; </code></pre> <p>Which allows AutoPostBack=true controls to execute inside of updatepanels. However, the form itself is still never submitted because my client side validation code returns false whenever a single Page Validator has in invalid value.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload