Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. $("#button1").click(function () {
  2. debugger;
  3. var $buttonClicked = $(this);
  4. var id = $buttonClicked.attr('data-id');
  5. var options = { "backdrop": "static", keyboard: true };
  6. $.ajax({
  7. type: 'GET',
  8. url: '/Employee/PopDetails',
  9. contentType: 'application/html; charset=utf-8',
  10. data: { 'EmpId': id },
  11. datatype: 'html',
  12. success: function (data) {
  13. debugger;
  14. $('#myModalContent').html(data);
  15. $('#myModal').modal(options);
  16. $('#myModal').modal('show');
  17.  
  18. },
  19. error: function () {
  20. alert("Dynamic content load failed.");
  21. }
  22. });
  23. });
  24.  
  25. $("#closbtn").click(function () {
  26. $('#myModal').modal('hide');
  27. });
  28. });
  29.  
  30. ` public PartialViewResult PopDetails(int? id)
  31. {
  32. Employee employee = db.Employees.Find(id);
  33.  
  34. return PartialView(employee);
  35. }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement