ASP.NET Change Control Style When Validation Fails
CSS Style: <style type="text/css"> body { font-family: Arial; font-size: 10pt; } .ErrorControl { // Put control style here which you want after validation fails background-color: #FBE3E4; border: solid 1px Red; } </style> Java Script: <script type="text/javascript"> function WebForm_OnSubmit() { if (typeof (ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) { for (var i in Page_Validators) { try { var control = document.getElementById(Page_Validators[i].controltovalidate); if (!Page_Validators[i].isvalid) { control.className = "ErrorControl"; } else { control.className = "";