HI,
controller method is not getting called.
View:
onclick of button I am submitting the page but before submitting I have to check validation like this:
<input type="submit" value="Initiate" id="btnInitiate" style="width: 80px; margin-left: 40px"
/>
function submitForm(e) {
debugger;
$.ajax({
url: '/VisaInformation/ValidateDependentEmployees',
type: 'POST',
dataType: 'json',
data: {
empNos: '194838',
Detailid: 19786,
DependentAvailibity: 0
},
success: function (data) {
debugger;
alert("success");
},
error: function () {
debugger;
alert('error');
}
});
}
Controller:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public JsonResult ValidateDependentEmployees(string empNos, int Detailid, bool DependentAvailibity)
{
.....
return this.Json(new { Success = "E" }, JsonRequestBehavior.AllowGet);
}
This Controller method is not getting called.