【问题标题】:Invalid web service call, missing value for parameter: 'dossier'无效的 Web 服务调用,参数缺失值:“档案”
【发布时间】:2019-06-14 07:44:00
【问题描述】:

有很多关于这个主题的帖子,我都检查了。

$('#documentTypeID').dataTable({
         "sDom": "<'row-fluid'>t<'row-fluid'<'span6'i><'span6'p>>",
         "bAutoWidth": false,
         "bProcessing": true,
         "bDestroy": true,
         "stateSave": true,
         "sAjaxSource": '<%= Page.ResolveClientUrl("GetDocumentTypes") %>',
         "data": JSON.stringify({ dossier: "x" }),

[WebMethod]
    public static string GetDocumentTypes(string dossier)

我不明白为什么会出现这个错误,我之前做过几次。 我的参数名称和ajax数据和你看到的一样。还有另一个错误链接吗?也许链接到 datatable.net?

【问题讨论】:

    标签: javascript json ajax datatables webmethod


    【解决方案1】:

    我刚刚找到了答案。 使用 datatable.net 时,您必须使用 fnServerParams 而不是 data 将参数传递给 web 方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      • 2011-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多