I have a question about what could stop a RequiredFieldValidator from preventing a postback.
I began working on an older, but simple aspx form and my predecessor used manual, server-side form validation (checking to see if some form fields have a value and if not displaying an error message in a label). I thought I'd clean out some unneeded code and replace the manual checking with RequiredFieldValidator controls, but while they appear to be validating, they aren't preventing a postback. Ie., I get my error messages displayed but the postback still occurs.
The form is quite simple and there are no CausesValidation="false" attributes set. My controls look like:
<asp:TextBox ID="txtPhone" Runat="server" Columns="20" MaxLength="20" />
<asp:RequiredFieldValidator ID="rfvPhone" runat="server" Display="Dynamic"
ErrorMessage="* Required" ControlToValidate="txtPhone" />
I created a brand new webform in the same project with just a single textbox, validator and submit button and it acts the same way. Error message displays but postback still occurs.
Is there a global or project-wide setting that would cause this behaviour? Something in the web.config or global.asax?