title: JavaScript type: "GET" not getting to controller from jQuery dataTable
body: <p>This is weird (to me)!  I can get to the controller by making a straight up ajax call but when I try to make the very same call from inside the dataTable code block, execution never gets in the controller.</p>
  
  <p>I'm new with jQuery datatables but I have other instances in the code base to use as examples.  I cannot figure out what is wrong here.</p>
  
  <h1>This code gets into the controller:</h1>
  
  <pre><code>getAssets = function () {
      // converting array of int(s) to a string
      var ids = selectedIds.toString();
      // setting the data for controller parameters
      var oData = { "facIds": ids, "type": selectedType };
  
      $.ajax({
          url: "api/services/getassetsbyids",   //  This call gets into the controller
          type: "GET",
          data: oData,
          dataType: "json",
          success: function (result) {
              var look = result;
          }   
      });
  }
  </code></pre>
  
  <h1>This code does NOT get into the controller:</h1>
  
  <pre><code>initSelectableAssetTable = function () {
  
      jQueryVar.jSelectableAssetTable.dataTable({
          "bPaginate": false,
          "bProcessing": true,
          "bAutoWidth": true,
          "aoColumns": [
              { "mDataProp": "AssetId", "bSortable": true },
              { "mDataProp": "AssetName", "bSortable": true }
          ],
          "aoColumnDefs": [
          { "mDataProp": null, "sDefaultContent": " ", "aTargets": [-1] }
          ],
          "sDom": '&lt;"top"&gt;rt&lt;"bottom"&gt;&lt;"clear"&gt;',
          "oLanguage": {
              "sEmptyTable": "No Assets found."
          },
          "sAjaxSource": $.baseURL("api/services/getassetsbyids"),
          "fnServerData": function (sSource, aoData, fnCallback) {
              var ids = selectedIds.toString();
              var oData = { "facIds": ids, "type": selectedType };
              $.ajax({
                  url: sSource, //  This never gets into the controller
                  type: "GET",
                  data: oData,
                  dataType: "json",
                  success: fnCallback,
                  error: function (jqXHR, textStatus, erroThrown) {
                      alert(jqXHR.responseText);
                  }
              });
          }
      });
  }
  </code></pre>
  
  <p><strong>I've even tried replacing sSource with the URL to no avail.</strong>  Can someone please tell me what am I doing wrong?</p>
  
  <h1>Controller Code:</h1>
  
  <pre><code>[HttpGet]
  public List&lt;AssetDTO&gt; getassetsbyids(string facIds, string type)
  {
      List&lt;AssetDTO&gt; assets = new List&lt;AssetDTO&gt;();
      List&lt;int&gt; ids = Array.ConvertAll&lt;string, int&gt;(facIds.Split(','), new Converter&lt;string, int&gt;(Convert.ToInt32)).ToList();
      IAssetService service = new AssetService();
      if(type.Equals("rack"))
      {
          assets = service.getrackassetsbyids(ids);
      } else {
          assets = service.getassetsbyids(ids);
      }
      return assets;
  }
  </code></pre>