A have an ajax call that executes fine when it is placed in the .cshtml file, after moving the JS to the call stopped working. I did some debuging and it apeared that right action is beeing called and it returns correct data, but I dont enter the ajax success function in the JS.
The same applies to getJSON.
and also no error message is being displayed
here is the code:
$.ajax({ type: "GET", cache: false, url: url, dataType: "json", success: function (data) { //... },error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); }
//action:
[HttpGet] public JsonResult HasUpdates() { var hasUpdates = diagnosticManager.AgentHasUpdates(); return Json(hasUpdates, JsonRequestBehavior.AllowGet); }
Am I missing some thing here?