$(function () { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: 'Employee.svc/GetEmployeeList', success: function (data) { $($.parseJSON(data.d)).each(function (index, value) { $("#TableID").append("<tr><td>" + value. + "</td><td>" + value.LastName + "</td><td>" + value.Email + "</td></tr>"); }); }, error: function (result) { alert(result); } }); });
public List<Employe> GetEmployeeList() { var listEmployee = new TestEntities().Employes.ToList(); return listEmployee; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)