Hi,
I just looked into this. The only way to prevent the postback is to comment out this code and rebuild:
UIHelper.DisableButtonAfterClick(
btnSend,
ContactFormResources.ButtonDisabledPleaseWait,
Page.ClientScript.GetPostBackEventReference(this.btnSend, string.Empty)
);
I incvestigated a workaround using code like this:
PostBackOptions postbackOptions = new PostBackOptions(btnSend);
postbackOptions.PerformValidation = true;
postbackOptions.ValidationGroup = "Contact";
UIHelper.DisableButtonAfterClick(
btnSend,
ContactFormResources.ButtonDisabledPleaseWait,
Page.ClientScript.GetPostBackEventReference(postbackOptions)
);
and it worked in terms of preventing the postback but the result was that the button was disabled and the form could not be submitted if client side validation failed.
In this case I don't think we really need the button disabled after clicking so its a good enough solution to just comment that out.
I have made this fix in my copy so it will be fixed in the next release. It was also missing the ValidationGroup="Contact" on the regexvaldiator.
Best,
Joe