Question: I try to make server-side processing for [DataTables](https://datatables.net) using Web API. There are two actions in my Web API controller with same list of parameters:

```
public class CampaignController : ApiController
{
    // GET request handler
    public dtResponse Get(int draw, int start, int length)
    {
        // request handling
    }

    // POST request handler
    public void Post(int draw, int start, int length)
    {
        // request handling
    }
}

```

If I use GET method to send AJAX request to the server, the `Get` action is activated. However, if I use POST method, then neither action are activated.
I tried to change POST handler signature to

```
public void Post([FromBody]object value)
{
    // request handling
}

```

In this case the `value` is `null`. Note, the `HttpContext.Current.Request.Form` collection isn't empty. The `draw`, `start`, `length` variables are exist in this collection. Thus, I think the trouble is in model binding, but I cannot fix it. Help me, please.

Answer: 
The only workaround is to get the keycode and cast it to String:

```
var str = '';
var el = document.getElementById('#test');
document.addEventListener('keypress', function(event) {
  const currentCode = event.which || event.code;
  let currentKey = event.key;
  if (!currentKey) {
    currentKey = String.fromCharCode(currentCode);
  }
  str += currentKey;
  event.preventDefault();
  el.innerHTML = str;
})

```
Since there is no character representation for control characters like up, down, left or right, you need to hardcode the character implementation in the code itself. I used **Window.event.KeyCode** event from **document.onkeydown** event listener and it works.
Here is my solution:

```
window.onload = function() {
  try {
    var el = document.getElementById("#test");
    var str = '';
    document.onkeydown = function() {
      var currentKey = window.event.keyCode;
      switch (currentKey) {
        case 40:
          str = "down";
          break;
        case 37:
          str = "left";
          break;
        case 39:
          str = "right";
          break;
        case 38:
          str = "up";
          break;
      }
      event.preventDefault;
      e1.innerHTML = str;

    };

  } catch (e) {
    alert(e.message);
  }
}

```