I am using a custom .net validator as shown below, the custom validator only displays it s error message in the validation summary. I have set the CssClass on the validation summary and this works fine and renders out all my error messages in li tags. What I want is one of my validators to have a separate style in the validation summary, I have tried setting the values as below but the CssClass of the custom validator is never reflected in the HTML
<asp:CustomValidator ErrorMessage="Test error" ID="problemsLoggingIn" runat="server" Display="None" ValidationGroup="LoginValidationGroup" CssClass="specialCaseLi" ForeColor="" />
<asp:ValidationSummary ID="ValidationSummary1" DisplayMode="BulletList" CssClass="errorMsg" runat="server" ValidationGroup="LoginValidationGroup" />
Gives this RUS:
<div id="ctl00_MainContentPlaceHolder_LoginView_LoginForm_ValidationSummary1" class="errorMsgDiv" style="color:Red;">
<ul><li>Test error</li></ul>
</div>