Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How can I pass multiple argument in Ajax call

$
0
0

this is my code given below. I want to pass EmployeeName, ClockedDatetoList along with ID . At the moment id is passing , But I want to pass  EmployeeName, ClockedDatetoList 

to the function ShowDeleteModalPopup. Please can you help

var table=  $('#tblData').DataTable({"ajax": {"url": "/Home/GetClockList?employeeid=" + $('#dropdownEmployee').val()+ "&clockdate=" + $('#txtAttendanceDate').val() ,"type": "POST","datatype": "json","dataSrc": function (json) {
                        return JSON.parse(json);
                    }
                 },"columns": [
                    { "data": 'ID', "width": "6%" },
                    { "data": 'EmployeeName', "width": "20%" },
                    { "data": 'ClockedDatetoList', "width": "20%" },
                    {"data": "ID","render": function (data) {
                            return `<div class="text-center"><a class='btn btn-danger text-white' style='cursor:pointer; width:100px;' onclick="ShowDeleteModalPopup(${data})" ><i class='far fa-trash-alt'></i> Delete</a></div>
                        `;
                        }, "width": "5%"
                    }

                ],
 function ShowDeleteModalPopup(id) {$('#lblID').val(id);$('#deleteConfirmationModal').modal('show');
        }


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>