Passing Custom Parameters

Passing Custom Parameters

CMOFNLCMOFNL Posts: 4Questions: 2Answers: 0
edited June 2021 in DataTables 1.9

Hi, I need to pass additional parameters from my view to the controller ( mvc5) within the datatables ajax call. In the read-only version of datatables I do this with the data part as follows :

  "data": function (data) {
                    data.StartDate = $('#reportStartDate').val();
                    data.EndDate = $('#reportEndDate').val();
                    data.DeviceId = $('#selectedDeviceId').val();
                data.__RequestVerificationToken = $('input[name=__RequestVerificationToken]').val();

I could then access these values from Request.Form in the controller method

However in the Editor version this does not seem to work, i.e. the values are not available in Request.Form

Can someone please help me out with the correct way to do this in the Editor version ? Thanks.


  • CMOFNLCMOFNL Posts: 4Questions: 2Answers: 0

    OK I found my mistake, I had these parameters in the Editor ajax call but no the table ajax call. Schoolboy error.

Sign In or Register to comment.