Ajax を使用してモデルから値を取得し、これらの値をクライアントの配列に割り当てるにはどうすればよいですか?
これが私のコントローラーです
public ActionResult Oku()
{
var query = from table in db.news where table.image_name select table;
return Json(query,JsonRequestBehavior.AllowGet);
}
私のAjaxスクリプトは次のとおりです。
$.ajax({
type: "get",
url: "Home/Oku",
data: {},
dataType: "json",
// Some codes to assign array
}
});
ご協力いただきありがとうございます