<script>
var tbodystr = "";
$.ajax ({
Type: "Get",
URL: "Gettable.ashx",
Cache:false,
DataType: "JSON",
Success:function (msg) {
$.each (msg, function (i) {
Tbodystr = "<tr>";
Tbodystr + + "<td>" + msg[i]._0 + "</td>";
Tbodystr + + "<td>" + msg[i]._1 + "</td>";
Tbodystr + + "<td>" + msg[i]._2 + "</td>";
Tbodystr = "</tr>";
$ ("#tbmain tbody"). Append (TBODYSTR);
});
}
});
</script>
Gettable.ashx file
Httpcontext.current.response.write (Json.getjsondata (ds, Keyfileds.tostring ()));
Large class of data, on the optimization under look at
Success:function (msg) {
var tbodystr = [];
$.each (msg, function (i) {
Tbodystr.push ("<tr>");
Tbodystr.push ("<td>" + msg[i]._0 + "</td>");
Tbodystr.push ("<td>" + msg[i]._1 + "</td>");
Tbodystr.push ("<td>" + msg[i]._2 + "</td>");
Tbodystr.push ("</tr>");
});
$ ("#tbmain tbody"). Append (Tbodystr.join (""));
}