How do I get values from model using Ajax and assign these values in an array on the client?
Here is my controller
public ActionResult Oku()
{
var query = from table in db.news where table.image_name select table;
return Json(query,JsonRequestBehavior.AllowGet);
}
My Ajax script is:
$.ajax({
type: "get",
url: "Home/Oku",
data: {},
dataType: "json",
// Some codes to assign array
}
});
Thanks for your help