Manoj Maharana

Manoj Maharana

  • NA
  • 362
  • 123.5k

How to change the textbox color with repect to error message

Aug 18 2016 4:34 AM
I want to change the error message border color on text box 
here is the code:
function ValidateFrom() {
if (document.getElementById("<%=txtCategoryName.ClientID %>").value.trim() == "") {
document.getElementById("<%=dvMessage.ClientID %>").innerHTML = "Please enter Category.";
document.getElementById("<%=txtCategoryName.ClientID %>").focus();
// document.getElmentById(val.controltovalidate).style.border = '3px solid red';
return false;
}
 by default in form-control it will takes blue..i want while changes on error message show red border..

Answers (18)