I've got an HtmlButton
in an ASP.NET 2.0 page (.NET 3.5 SP1):
<button id="MyButton" runat="server" onserverclick="MyButton_Click">
Which when rendered looks like this:
<button onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(''); __doPostBack('ctl00$MainContent$MyButton','')" id="ctl00_MainContent_MyButton">
It works fine in IE7/8 - if there are client validation errors this will prevent the postback, but in Firefox 3.6 the client validation and postback appear to run in parallel - you see the client validation errors appear then the page posts back immediately, even when it shouldn't.
Does anyone know why this is broken in Firefox and what the fix is?