function GetAllEmployee() { //$("#emps").empty(); $.ajax({ url: 'http://localhost:54374/api/Employee/';, type: 'GET', dataType: 'json', success: function (data) { alert('yes'); for (var i = 0; i < data.length; i++) { $("<table><tbody><tr></tr></tbody></table><table><tbody><tr><table><tbody><tr><table><tbody><tr><td></td></tr></tbody></table></tr></tbody></table></tr></tbody></table>" + data[i].Id + "<table><tbody><tr><table><tbody><tr><table><tbody><tr><td></td></tr></tbody></table></tr></tbody></table></tr></tbody></table>" + data[i].Name + "<table><tbody><tr><table><tbody><tr><table><tbody><tr><td></td></tr></tbody></table></tr></tbody></table></tr></tbody></table>" + data[i].Salary + "<table><tbody><tr><td>" + data[i].City + "</td></tr></tbody></table>").appendTo("#students"); } }, error: function (xhr) { alert('Some error occured'); alert(xhr); } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)