title: Sending data to the server with fnServerParams and aoData for jquery DataTable does not work in MVC4
body: <p>I want to send extra data to serverside (ASP.Net MVC4) for my jquery datatable. There are many examples on how to this client side, but I can't get it to work on the serverside.</p>
  
  <p>Here's the code:</p>
  
  <p>javascript:</p>
  
  <pre><code>$(document).ready(function () {    
      var oTable = $('#myDataTable').dataTable({
          "bServerSide": true,
          "sAjaxSource": "SearchPatient/DataHandler",        
          "fnServerParams": function (aoData) {
              alert('in fnServerParams');
              aoData.push( { "name": "more_data", "value": "my_value" } );
          }
  
      });
  });
  </code></pre>
  
  <p>Note: the alert goes off, so the function itself is working.</p>
  
  <p>My model class:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Class that encapsulates most common parameters sent by DataTables plugin
      /// &lt;/summary&gt;
      public class JQueryDataTableParamModel
      {
          /// &lt;summary&gt;
          /// fnServerparams, this should be an array of objects?
          /// &lt;/summary&gt;        
          public object[] aoData { get; set; }
  
          /// &lt;summary&gt;
          /// Request sequence number sent by DataTable, same value must be returned in response
          /// &lt;/summary&gt;       
          public string sEcho { get; set; }
  
          /// &lt;summary&gt;
          /// Text used for filtering
          /// &lt;/summary&gt;
          public string sSearch { get; set; }
  
          /// &lt;summary&gt;
          /// Number of records that should be shown in table
          /// &lt;/summary&gt;
          public int iDisplayLength { get; set; }
  
          /// &lt;summary&gt;
          /// First record that should be shown(used for paging)
          /// &lt;/summary&gt;
          public int iDisplayStart { get; set; }
  
          /// &lt;summary&gt;
          /// Number of columns in table
          /// &lt;/summary&gt;
          public int iColumns { get; set; }
  
          /// &lt;summary&gt;
          /// Number of columns that are used in sorting
          /// &lt;/summary&gt;
          public int iSortingCols { get; set; }
  
          /// &lt;summary&gt;
          /// Comma separated list of column names
          /// &lt;/summary&gt;
          public string sColumns { get; set; }
  
          /// &lt;summary&gt;
          /// Text used for filtering
          /// &lt;/summary&gt;
          public string oSearch { get; set; }
  
      }
  </code></pre>
  
  <p>and finally my Controller:</p>
  
  <pre><code>   public ActionResult DataHandler(JQueryDataTableParamModel param)
      {
          if (param.aoData != null)
          {
              // Get first element of aoData.  NOT working, always null              
              string lSearchValue = param.aoData[0].ToString();
  
              // Process search value
              // ....
          }
  
  
          return Json(new
          {                
              sEcho = param.sEcho,
              iTotalRecords = 97,
              iTotalDisplayRecords = 3,
              aaData = new List&lt;string[]&gt;() {
                  new string[] {"1", "IE", "Redmond", "USA", "NL"},
                  new string[] {"2", "Google", "Mountain View", "USA", "NL"},
                  new string[] {"3", "Gowi", "Pancevo", "Serbia", "NL"}
                  }
          },
          JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>Note: the action handler gets hit, so the ajax call to get data is also working and my datatable gets filled with 3 rows..</p>
  
  <p>The problem is: aoData is always null. I expect the first element to hold "my_value".</p>
  
  <p>Any help is much appreciated!</p>