Hello guys how to change a color of a textbox in cshtml?. I have this code
$("#BUTTON").click(function (event) {
var urlPA = URL;
var crty = $("#Courtesy").val();
var fname = $("#Familyname").val();
var gname = $("#GivenName").val();
if (crty != 0 && fname != 0 && gname != 0) {
$.ajax({
type: "GET",
url: urlPA,
data: 'DATA',
success: function (response) {
alert(response);
/// when success the color of the textbox return to normal
},
datatype: "text"
});
} else { alert("Please fill up the required fields.");
////// when error the textbox background makes red
}
});
How to do it?. Thanks.