呼び出されないでコールバックします。
function GetTrainingResults(id,callback){
$.getJSON("/dashboard/GetTrainingResults/", {'id':id}, callback);
}
GetTrainingResults('id',function(result){
alert(result);
});
コードビハインドは
public ActionResult GetTrainingResults(int id)
{
string test = "You are there.";
return Json(test, JsonRequestBehavior.AllowGet);
}
または、別の方法を提案します。コントローラ メソッドを呼び出し、javascript でメソッドの応答を待機するタスクを実行します。
ありがとう