Some time ago I spend a few hours on it and since then I have been using some custom js magic to accomplish this.
In fact is quite simple and in the way that ASP.NET validation works. The basic idea is add a css class to attach a javascript event on each control you want quick visual feedback.
<script type="text/javascript" language="javascript"> /* Color ASP NET validation */ function validateColor(obj) { var valid = obj.Validators; var isValid = true; for (i in valid) if (!valid[i].isvalid) isValid = false; if (!isValid) $(obj).addClass('novalid', 1000); else $(obj).removeClass('novalid', 1000); } $(document).ready(function() { $(".validateColor").change(function() {validateColor(this);}); }); </script>
For instance, that will be the code to add on an ASP.Net textbox control. Yes, you can put as many as you want and it will only imply add a CssClass value.
<asp:TextBox ID="txtBxEmail" runat="server" CssClass="validateColor" />
What it does is trigger ASP.Net client side validation when there is a change on working control and apply a css class if it's not valid. So to customize visualization you can rely on css.
.novalid { border: 2px solid #D00000; }
It's not perfect but almost :) and at least your code won't suffer from extra stuff. And the best, works with all kind of Asp.Net validators, event custom ones.
I haven't seen something like this googling so I wan't to share my trick with you. Hope it helps.
extra stuff on server side:
After some time using this I also add this ".novalid" css class from code behind when need some particular validation on things that perhaps could be only checked on server side this way:
Page.Validate(); if (!requiredFecha.IsValid || !CustomValidateFecha.IsValid) txtFecha.CssClass = "validateColor novalid"; else txtFecha.CssClass = "validateColor";