Mr. x wrote:
There is one of each... He must've figured it out as he hasn't replied to
either post.
Well,
It's good somebody notice that I have both RequiredFieldValidator and
CustomValidator.
(I have checked also without RequiredFieldValidator - the same result).
Still, I didn't resolve the problem, and I am still waiting for kind a
solution, please.
Your code as originally posted seems to work fine for me - I did have to
add a few overhead-type tags to get ASP.NET to accept the file (@Page,
the form tag, etc.), but otherwise I simply pasted in what you posted.
Here's exactly what I placed into an IIS application directory in test.aspx:
================================================== =====================
<%@ Page language="VB" debug="false" %>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:table>
<asp:TableRow>
<asp:TableCell>
<asp:RequiredFieldValidator
ControlToValidate="a_email"
Text="*"
runat="server" />
</asp:TableCell>
<asp:TableCell>email:</asp:TableCell>
<asp:TableCell><asp:TextBox id="a_email" runat="server"
/></asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:CustomValidator
ControlToValidate="a_email"
OnServerValidate="checkEmail"
Text="Illegal"
ErrorMessage="Illegal"
runat="server" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<script runat = "server">
Sub checkEmail(source As object,args As ServerValidateEventArgs)
args.IsValid=false 'just testing - always false
End sub
</script>
</form>
</body>
</html>
================================================== =====================
If you still have the problem with this exact aspx file, you might want
to run a repair installation for your .NET Framework.
--
mikeb