Note that there are some explanatory texts on larger screens.

plurals
  1. PORequired Field Validators firing in Chrome & Safari when button has CausesValidation="false"
    primarykey
    data
    text
    <p>I'm having some problems with my ASP.NET 4 application in Chrome &amp; Safari (works in Firefox and IE).</p> <p>I have a button declared using the following code:</p> <pre><code>&lt;asp:Button ID="btnEOI1" runat="server" CssClass="buttonCSS" Text="Lodge an Expression of Interest" OnClick="btnEOI_Click" CausesValidation="False" /&gt; </code></pre> <p>In the code-behind file I have the following code:</p> <pre><code>protected void btnEOI_Click(object sender, EventArgs e) { Response.Redirect("Default.aspx", true); } </code></pre> <p>Also on the page is a LoginControl that has two RequiredFieldValidators and a RegularExpressionValidator:</p> <pre><code>&lt;asp:requiredfieldvalidator id="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="Please enter your User Name." SetFocusOnError="true" Display="None"&gt; &lt;/asp:requiredfieldvalidator&gt; &lt;asp:RegularExpressionValidator runat="server" id="RegularExpressionValidator1" ControlToValidate="UserName" ErrorMessage="Please enter your User Name without spaces." ValidationExpression="[\S]+" Display="None" SetFocusOnError="true" &gt; &lt;/asp:RegularExpressionValidator&gt; &lt;asp:requiredfieldvalidator id="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Please enter your Password." SetFocusOnError="true" Display="None"&gt; &lt;/asp:requiredfieldvalidator&gt; </code></pre> <p>When I click the button in Chrome and Safari, the UserNameRequired and PasswordRequired validators fire even though the button has CausesValidation="false". The validation errors do not occur in IE or Firefox.</p> <p>How can I stop the validators from firing in Chrome and Firefox?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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