joe_pool_is
Well-known member
Whats wrong with my validators? They used to work, and I certainly dont 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>