In the <Head> tag of the
design page e.g. (default.aspx) create the function that will loop through all
the validations control present on the page and highlight the control by
coloring the border to red if the controls are left blank.

<scripttype="text/javascript">

function validateAndHighlight() {

for (var
i = 0; i < Page_Validators.length; i++) {

var val = Page_Validators[i];

var ctrl =
document.getElementById(val.controltovalidate);

if (ctrl
!= null && ctrl.style != null) {

if
(!val.isvalid) {

ctrl.style.borderColor
= '#FF0000';

ctrl.style.backgroundColor = '#fce697';

}

else
{

ctrl.style.borderColor
= '';

ctrl.style.backgroundColor = '';

}

}

}

}

</script>

In
the <Form> tag of the design page e.g. (default.aspx), place the controls
as:

" I hope you have got the trick to highlight the asp.net controls on validation failure using javascript and
If you like my work; you can appreciate by leaving your comments, hitting
Facebook like button, following on Google+, Twitter, Linked in and Pinterest,
stumbling my posts on stumble upon and subscribing for receiving free updates
directly to your inbox . Stay tuned and stay connected for more technical
updates."

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..