我想向控制器发送一些数据,但我总是在控制器的参数中得到空值。我在寻找解决方案,但没有找到解决方案。请提供一些建议或帮助。
ajax 调用
 var submittedName = 1; 
 $.ajax(
  {
      url: '/api/monitor/Detailsfetch',
      type: "post",
      data: { 'submittedName': submittedName},
      success: function (data) {
          alert("passed");
      },
      error: function (xhr, ajaxOptions, thrownError) {
               alert(thrownError);}
  });
控制器部分
  [System.Web.Http.HttpPost]
  public ContentResult Detailsfetch(string submittedName)        
    {sone code here}`