Solutions1
One solution what I can offer is through Knokcout JS. lets say you have a controller action which will actually give you set of records -
public JsonResult GetDeficiency()
{
List deficiency = new List();
Walkthru wt = new Walkthru();
wt.deficiency = "Incorrect faucet installed";
wt.image = "";
deficiency.Add(wt);
wt = new Walkthru();
wt.deficiency = "Very low water pressure";
wt.image = "";
deficiency.Add(wt);
return Json(deficiency, JsonRequestBehavior.AllowGet);
}
Then you html and JQuery can be -
function Model() {
var self = this;
self.records = ko.observableArray([]);
$.getJSON("/home/GetDeficiency", function (data) {
self.records(data);
})
}
ko.applyBindings(new Model());
When you run the code, you can see all the records displayed in the divs as items.
Talk1:
actually the return statement is like this return Json(deficiency.ToDataSourceResult(request),JsonRequestBehavior.AllowGet);