In my Angularjs service, I have this code:
$http.post("/EditWorkout/GetId", data).error(function (responseData) { console.log("Error !" + responseData); });
And I have this method in my ASP.net controller:
[System.Web.Http.HttpPost] public JsonResult GetId(string routineId) { try { string x = routineId; return Json(new {success = true}); } catch (Exception ex) { return Json(new { success = false, errorMessage = ex.Message }); } }
I put a breakpoint on return Json(new {success = true}); , and it starts, but for some reason my function II is null, and the data that I send using angular $ http.post is not.
Why is this happening?
source share