title: Getting failed on returning string from API to JSON AJAX POST in mvc Javascript
body: <pre><code>$("#modelchange").change(function() {
      $.ajax({
          type: 'POST',
          url: '@Url.Action("GetStore")',
          dataType: 'json',
          data: {
              Id: $("#modelchange").val()
          },
          success: function(storeName) {
              $('#storeName').text("Store : " + storeName);
          },
          error: function(ex) {
              alert('Failed to load store Value');
          }
      });
      return false;
  });
  </code></pre>
  
  <p>API</p>
  
  <pre><code>[HttpPost]
  public string GetStore(int Id)
  {
      string storeName = db.AddInktoStores.Single(a =&gt; a.InkId == Id)).Store.StoreName;
      return storeName;
  }
  </code></pre>
  
  <p>Above mentioned is a controller and JSON in my javascript.</p>
  
  <p>I am trying to get Store Name but I keep getting throw into my error: function</p>
  
  <p>Please Help!</p>