aditya immadi

aditya immadi

  • NA
  • 215
  • 23.8k

Jquery ajax calls in MVC

May 12 2016 10:31 AM
Hai all , i wrote this lines for updating users
$.ajax({
url: '/Admin/UpdateUser',
type: "POST",
datatype: "JSON",
data: { UserId: EditUser, name: name, email: email, country: country, mobilenum: mobilenum, password: password, exp: exp, funcarea: funcarea },
success: function (s) {
$("#EditUserDetails").show();
$("#EditUser").hide();
alert("Updated successfully");
location.reload();
}
});
 
and in my controller
 
public ActionResult EditUser(int id, string name, string email, string country, string mobilenumber, string password, string expierence, string functionalarea, string isactive)
{
int UserId = v.UpdateUsers(id, name, email, country, mobilenumber, password, expierence, functionalarea, isactive);
return Json(UserId, JsonRequestBehavior.AllowGet);
 
i think in ajax call i have made a mistake..any suggestions
 
TIA 
 
 

Answers (3)