You're right.
What you get from the summary validator is the following:
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><font color="Red">Some of the fields are entered improperly or are
missing.
<ul><li>Need a Search Name</li></ul>
</font>
</td>
</tr>
</table>
It looks absolutely correct.
But deep in one of my class files there was an entry:
p,li,ol,ul{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #333333;
text-decoration: none;
line-height: 14px;
}
This overrode the font (#333333 is sort of charcoal grey). If I remove the
style from the css file, it works fine.
I now need to find a way to override this, as I am not actually doing the UL
(asp is) so can't put a class to override the general one directly on the UL
tag.
Thanks,
Tom
I will have to find a way to override this in my
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
I just tried this, and it shows the bullet in red if no character is
entered:
<asp:TextBox ID="SearchName" Runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1"
ForeColor="#ff0000"
ControlToValidate="SearchName"
Text="<br>You must enter a Search Name"
ErrorMessage="Need a Search Name"
Display="Dynamic"
Font-Size="10px"
runat="server" BackColor="#ffffff"
/>
<asp:ValidationSummary ID="ValidationSummary1"
HeaderText="Some of the fields are entered improperly or are missing."
ForeColor="#FF0000"
runat="server"
BackColor="#ffffff"
/>
<asp:Button ID="Button1" Runat="server" Text="Button" />
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uW****************@tk2msftngp13.phx.gbl... "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:85**********************@msnews.microsoft.com ... Also, I tried using it (without leaving the ErrorMessage property out)
and the Header is displayed in Red and the bullets are in Black. Is
there a way to make it all Red?
ForeColor="Red"
I tried that.
I even put the Hex values in. I also put it in both the Validator and
the Summary:
<asp:RequiredFieldValidator ForeColor="#FF0000"
ControlToValidate="SearchName"
Text="<br>You must enter a Search Name"
ErrorMessage="Need a Search Name"
Display="Dynamic"
Font-Size="10px"
runat="server" />
<asp:CustomValidator ForeColor="#FF0000"
ControlToValidate="SearchName"
OnServerValidate="ValidateSearchName"
Font-Size="10px"
Display="Dynamic"
Text="<br>Search Name already exists!"
ErrorMessage="Search Name already Exists"
runat="server" />
<asp:ValidationSummary
HeaderText="Some of the fields are entered improperly or are
missing."
ForeColor="#FF0000"
runat="server"/>
Again, the headertext is red, but the bullet items are black.
Tom
-Brock
DevelopMentor
http://staff.develop.com/ballen