javascript - Web API Ajax calling not working -
here js code call custom web api method.. $.ajax({ url: '/api/adminapi/industrypost/?industryname='+addnewindustryname, type: 'post', cache: false, contenttype: 'application/json; charset=utf-8', success: function (response) { // response code. } }); this working fine in case using 'data' tag send data, not working. following. $.ajax({ url: '/api/adminapi/industrypost', type: 'post', cache: false, contenttype: 'application/json; charset=utf-8', data: { 'industryname': addnewindustryname }, success: function (response) { // response code. } }); webapiconfig config.maphttpattributeroutes(); config.routes.maphttproute( name: "defaultapi", routetemplate: "api/{controller}/{action}/{id}", defaults: new { id =...