title: Angular JS Post is not working
body: <p>I am using angularjs and ionic.I post multiple data from angular js to Api Controller in asp.net mvc</p>
  
  <p>I have below code in order to <strong>post multiple form data</strong> to controller in asp.net mvc from angularjs.</p>
  
  <pre><code>  $http({
          method: 'POST',
          url: 'http://localhost:51425/api/values/Response',
          params: { PropertyFirst: "1", PropertySecond: "2" },
          headers: {'Content-Type': 'application/x-www-form-urlencoded'},
      }).success(function (data) {
          alert("ok");
      });
  </code></pre>
  
  <p>If i use below code this <strong>works</strong> </p>
  
  <pre><code>[HttpPost]
  public object Response(string PropertyFirst , string PropertySecond)
  {
  
  HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");
  
  
  return null;
  }
  </code></pre>
  
  <p>However, if i use below code it is <strong>not working</strong></p>
  
  <p><strong>PropertyClass</strong> </p>
  
  <pre><code>public string PropertyFirst{ get; set; }
  public string PropertySecond{ get; set; }
  </code></pre>
  
  <p><strong>Controller side</strong></p>
  
  <pre><code>[HttpPost]
  public object Response(PropertyClass propertyValues)
  {
  
  HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");
  
  return null;
  }
  </code></pre>
  
  <p>I get below error :</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 500 (Internal Server Error)
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>How can i post <strong>PropertyFirst</strong> and <strong>PropertySecond</strong> to <strong>PropertyClass</strong> ?</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks.</p>