Bad Validator?

joe_pool_is

Contributor
Joined
Jan 18, 2004
Messages
507
Location
Longview, TX [USA]
What's wrong with my validators? They used to work, and I certainly don't remember changing anything. Am I using an outdated design?
Code:
<table><tbody>
  <tr>
    <td>Name:</td>
    <td>
      <asp:TextBox ID="txtFirst" runat="Server" />
      <asp:RequiredFieldValidator ID="validFirst" runat="server"
             ErrorMessage="Required" ControlToValidate="txtFirst">
             Required</asp:RequiredFieldValidator>
    </td>
  </tr>
  <tr>
    <td>E-Mail:</td>
    <td>
      <asp:TextBox ID="txtEmail" runat="server" />
      <asp:RegularExpressionValidator ID="vaildEmail" runat="server"
             ErrorMessage="Invalid" ControlToValidate="txtEmail"
  ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
             Required</asp:RegularExpressionValidator>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center">Message:<br />
    <asp:TextBox ID="txtMessage" Columns="40" Rows="10" runat=server
            Text="Write your message here." TextMode="MultiLine" />
      <br />
    <asp:RequiredFieldValidator ID="validMessage" runat="server"
            ErrorMessage="Required" ControlToValidate="txtMessage">
            Required</asp:RequiredFieldValidator>
  </td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <asp:Button ID="btnSubmit" runat="Server" Text="Send" OnClick="btnSubmit_Click" />
    <br />
  </tr>
</tbody></table>
 
Well, that sucks! I also read in your links that these Required Field Validators aren't being supported by other browsers.

I think I'll do a search on JavaScript validators and just ditch the MS version.
 
What version of .Net are you using? IIRC the 1 / 1.1 versions pretty much only supported IE client side - the 2 and later versions though have much better browser support.

Did you try copying the aspnet_client/system_web folder like the links suggested?
 
Back
Top