DataTable server side processing not working

DataTable server side processing not working

sdyson3sdyson3 Posts: 4Questions: 3Answers: 0

I have a JQuery Datatable (server side processing) working in .Net 4.5 but the same code is not working in .Net 2.0.

Due to specific requirements, i need to implement this in net 2.0 .

I get the following Internal Server Error 500 error message;

enter image description here

Here is the code to initialise DataTable

     $('#tblDetails').DataTable({
        "processing": true,
        "serverSide": true,
        "pageLength": 400,
        "bDestroy": true,
        "scrollY": "300px",
        "scrollCollapse": true,

        "ajax": {

            url: "Service.asmx/GetDataForDataTable", type: "post",
            data: function (d) {
                d.regDate = registration_date,
                d.Salary = salary;
            }
        },
        "columns": [
                 { "data": "Name" },
                 { "data": "Date" },

        ]

    });

Here is the DataTable response call;

public class DataTableResponse
{
 public int draw;
 public int recordsTotal;
 public int recordsFiltered;
 public List<SampleDetails> data;
}

If i pass the parameters in the following format then there is no error but server side method is not being called and datatable is stuck on processing.

data: "{ regDate: '" + registration_date + "', Salary: '" + salary + "'}",

Answers

  • allanallan Posts: 63,464Questions: 1Answers: 10,466 Site admin

    What is the server-side library you are using for this? Or is it some custom code? It sounds like it needs to be ported over to .NET Core.

    Another option might be to use our Editor .NET libraries which support server-side processing and are open source under the MIT license.

    Allan

This discussion has been closed.