title: null values received in Post method from ajax call ASP.net 4.5
body: <p>in my </p>
  
  <pre><code>  public class ValuesController : ApiController
  </code></pre>
  
  <p>I have a Post method :</p>
  
  <pre><code> public void Post([FromBody]string value)
          {
              string a = "asdsad";
          }
  </code></pre>
  
  <p>I created a small HTML with a button on it, When I press on it, im using <code>$.ajax</code> to call the <code>Post</code> method using :</p>
  
  <pre><code>function myfunc() 
               {
  
  
      $.ajax({
                  contentType: 'application/json',
                  data: '{"value":"on"}',
                  dataType: 'json',
                  success: function(data){
                      app.log("device control succeeded");
                  },
                  error: function(){
                      app.log("Device control failed");
                  },
                  processData: false,
                  type: 'POST',
                  url: 'http://localhost:49558/api/values',
              });
          }
  </code></pre>
  
  <p>The problem is the <code>Post</code> method receives in the <code>string value - null</code></p>
  
  <p>If there is something wrong with this approach:</p>
  
  <p>what is the best way to send data via post method using ajax?</p>