Ok, I did some poking around and found the problem in the MS
WebResource.axd javascript. To prevent the form from posting multiple
times when an impatient or clumsy user presses enter more than once, MS
sets a flag when the FireDefaultButton function is called. This does
not get reset if the form fails validation, so FireDefaultButton
ignores all subsequent Enter Key presses.
What MS should do in their next hotfix (are you listening?) is set the
__defaultFired flag to true as the last step in the form.onsubmit(), so
that it only prevents the Enter Key press from submitting when it will,
in fact, cause duplicate posts.
Better yet, MS should add a property to the Button controls called
"AllowMultiplePostBacks", defaulted to false. Might be worth doing this
in a custom control in the meantime...
Anyway, there is a workaround. It is a "hack" because the
__defaultFired flag is not intended to be tweaked in client code and
may change in future releases, but it works for now. Keep in mind that
after installing this hack, the form will submit multiple times if the
Enter Key is pressed repeatedly unless you put something in your page
to prevent that.
Put the following code somewhere in the page. Be sure to replace
[DefaultButtonValidationGroup] with the validation group set on your
DefaultButton, or remove that param if you are not using validation
groups.
<script type="text/javascript" language="javascript">
function defaultButtonFix() {
__defaultFired = false;
}
</script>
<asp:CustomValidator ID="cvDefaultButtonFix" runat="server"
ClientValidationFunction="defaultButtonFix"
Display="None"
ValidationGroup="[DefaultButtonValidationGroup]" />