I have a validation summary on page.
<asp:ValidationSummary ValidationGroup="myValSumGroup" ID="myValSum" runat="server" />
And I have a few required validators which add to this summary:
A missing
B missing
N missing
But I have some (make it 10) additional required validators and all have the same error message
**SPECIAL is missing**
This add 10 more errors in summary. But as they have the same text is it possible to add to validation summary only:
**YOU HAVE ERRORS IN YOUR SPECIALS**
instead of
**SPECIAL is missing**
**SPECIAL is missing**
**SPECIAL is missing**
...
I have tried some JS voodoo magic but doesn't work:
<asp:Button ... OnClientClick="return Button2_onclick()" ...
<script type="text/javascript">
function Button2_onclick() {
document.getElementById("<%=myValSum.ClientID %>").innerHTML =
document.getElementById("<%=myValSum.ClientID %>").innerHTML +
"<br> YOU HAVE ERRORS IN YOUR SPECIALS";
}
</script>