Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#button1").click(function () {
- debugger;
- var $buttonClicked = $(this);
- var id = $buttonClicked.attr('data-id');
- var options = { "backdrop": "static", keyboard: true };
- $.ajax({
- type: 'GET',
- url: '/Employee/PopDetails',
- contentType: 'application/html; charset=utf-8',
- data: { 'EmpId': id },
- datatype: 'html',
- success: function (data) {
- debugger;
- $('#myModalContent').html(data);
- $('#myModal').modal(options);
- $('#myModal').modal('show');
- },
- error: function () {
- alert("Dynamic content load failed.");
- }
- });
- });
- $("#closbtn").click(function () {
- $('#myModal').modal('hide');
- });
- });
- ` public PartialViewResult PopDetails(int? id)
- {
- Employee employee = db.Employees.Find(id);
- return PartialView(employee);
- }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement