Hi Peter,
Does it do what you want if you set the validator to display="None" ?
Ken
Microsoft MVP [ASP.NET]
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:textbox id="TextBox2" runat="server"></asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator1"
runat="server" controltovalidate="TextBox1" display="None"
errormessage="RequiredFieldValidator"></asp:requiredfieldvalidator><br />
<br />
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator2"
runat="server" controltovalidate="TextBox2"
errormessage="RequiredFieldValidator"></asp:requiredfieldvalidator><br />
<br />
<asp:validationsummary id="ValidationSummary1" runat="server" />
<br />
<br />
<asp:button id="Button1" runat="server" text="Button" /></div>
</form>
</body>
</html>
"PeterKellner" <pk**********@73rdstreet.com> wrote in message
news:ap********************************@4ax.com...
I'm wanting to just show the error in a ValidationSummary control, not
next to the actual TextField I'm putting a RequiredFieldValidator next
to. I don't even want the little "*" showing which field it is.
(strange requirement, but that's the way it is).
I've found that if I set the attribute Text="" (zero length string),
it always uses the ErrorMessage instead of Text. I need the
ErrorMessage because that is what is going to show up in the
ValidationSummary control.
Any ideas how to force the text to blank right next to the control?
Thanks,
Peter Kellner
http://peterkellner.net