Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Passing Custom Parameters

$
0
0

Hi, I need to pass additional parameters from my view to the controller (asp.net 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.


Viewing all articles
Browse latest Browse all 1816

Trending Articles