Ajaykumar Singh

Ajaykumar Singh

  • NA
  • 84
  • 5.9k

show validation message on button click

Nov 29 2016 7:53 AM
$.ajax({
url: '@Url.Action("AddNewBranch", "BranchAPI", new { httproute = "" })',
type: "POST",
data: JSON.stringify(branchDetail),
contentType: "application/json;charset=utf-8",
success: function (result) {
if (result == "Success") {
addNewBranchModal();
}
else if (result == "fail") {
alert("2nd");                      //after this i want to enable @Html.ValidationMessageFor                                             
};
},
error: function (e) {
alert(e);
}
 
 

Answers (4)