Have a web application I am building using Visual Studio 2022, .Net (not Core) that has a page that uses ajax to gather data for a DataTables table. Problem I am having is that the ajax endpoint never gets called and no errors are reported. I have several others working fine. When I use the browser developer to step through the code, it just simply skips over the call. I would expect there to be an error somewhere but it simply just doesnt even try to hit the ajax endpoint. It has to be something very simple I am missing so if anyone can help.
(the reason for the variable assignment to 'table' is that the table get recreated over and over based on user input for filtering and we use the variable to destro the current data)
The jQuery code, contained within a function:
table = $('#feelist').DataTable({
//'pageLength': tablelength,
//'lengthMenu': [[10, 15, 20, 25, 50, 1000], [10, 15, 20, 25, 50, 1000]],
'ajax': {
'url': '/LoadFeeScheduleFees/',
'type': 'POST',
//'dataType': 'json'
'data': {
'clinicid': clinicid,
'standardfeeid': standardfeeid,
'feescheduleid': feescheduleid
}
},
'columns': [
{ 'data': 'Id', 'name': 'Id' }, // 0
{ 'data': 'ServiceCode', 'name': 'ServiceCode' }, // 1
{ 'data': 'ADACode', 'name': 'ADACode' }, // 2
{ 'data': 'ServiceDescription', 'name': 'ServiceDescription' }, // 3
{ 'data': 'CurrentStandardFee', 'name': 'CurrentStandardFee' }, // 4
{ 'data': 'CurrentAllowableFee', 'name': 'CurrentAllowableFee' }, // 5
{ 'data': 'LastFeeDate', 'name': 'LastFeeDate' }, // 6
{ 'data': 'NewInsuranceFee', 'name': 'NewInsuranceFee' }, // 7
{ 'data': 'Fill', 'defaultContent': '' } // 8
],
'columnDefs': [
{ 'visible': false, 'targets': [0] },
{ 'sortable': false, 'targets': [8] }
],
'order': [
[1, 'asc']
]
});
}