Here is my html and ajax
- "utf-8" />
- "button" id="btnUsers" value="GetUsersList"/>
- "button" id="btnClear" value="Clear Users"/>
- "Userlist"
My controller code is here
- public class EmployeesController : ApiController
- {
- [HttpGet]
- public IEnumerable
Get() - {
- using (LoginEntities ln = new LoginEntities())
- {
- return ln.Users.ToList();
- }
- }
- [HttpGet]
- public HttpResponseMessage Get(int id)
- {
- using (LoginEntities dd = new LoginEntities())
- {
- var entity = dd.Users.FirstOrDefault(e => e.UserId == id);
- if (entity != null)
- {
- return Request.CreateResponse(HttpStatusCode.OK, entity);
- }
- else
- {
- return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Employee Id " + id.ToString() + "Not found");
- }
- }
- }
when i inspect the data is there but the UL is not binding and not showing the data on page there is no error on console Jquery is working fine i check it with alert.
Mario ScheerenPosted Mar 22, 2019, 12:35 AM
Mario ScheerenPosted Mar 22, 2019, 2:52 AM
Mark TaborPosted Mar 22, 2019, 2:28 AM
Mario ScheerenPosted Mar 22, 2019, 2:27 AM
Mark TaborPosted Mar 22, 2019, 2:13 AM
Mark TaborPosted Mar 22, 2019, 2:07 AM
Mario ScheerenPosted Mar 22, 2019, 1:57 AM
Mark TaborPosted Mar 22, 2019, 1:47 AM
Mark TaborPosted Mar 22, 2019, 1:42 AM
Mark TaborPosted Mar 21, 2019, 2:17 PM
Mario ScheerenPosted Mar 21, 2019, 1:10 PM
is valid I think you will have to
Mario ScheerenPosted Mar 21, 2019, 1:08 PM