public JsonResult Authe(string Email, string Password, bool ? Active) {
var x = (from n in db.Authntications where n.Email == Email && n.Password == Password select n).FirstOrDefault();
if (x != null) {
var xx = (from n in db.Authntications where n.Email == Email && n.Password == Password && n.Active == Active select n).FirstOrDefault();
if (xx == null) {
msg = "Your A/c not activated....";
}
} else
msg = "Your Account Details Not Valid please check Details You mentiond...";
return new JsonResult {
JsonRequestBehavior = JsonRequestBehavior.AllowGet
};
}
AngularJs
var ZmrSer = MyAuthneticService.Authen(Sucess);
$scope.msg = msg.data;
$('#modalSuccess').modal('show');
答案 0 :(得分:0)
您应该从允许获取行为的操作方法返回Json
。
return Json(msg, JsonRequestBehavior.AllowGet);