weixin_33713503 2018-08-08 10:49 采纳率: 0%
浏览 37

AJAX和DATATABLES

When i call Ajax request, network request window show that there is an error in the AJAX response.

Message:    Primitiva JSON non valida: idParrocchia.
<br>StackTrace in:System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() in System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) in System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) in System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) in System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input) in System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext context, JavaScriptSerializer serializer) in System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context) in System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)
    ExceptionType   System.ArgumentException

The code is

"ajax": {
    "contentType": "application/json; charset=utf-8",
    "type": "POST",
    "url": "ajax/WSHome.asmx/GetNewsList",
    "data": {idParrocchia: idParr},
    "dataType": "json",
    'dataSrc': '',
    'cache': false,
    "success": successAjax()
},

Thanks, Luca

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 不同数据类型的特征融合应该怎么做
    • ¥15 用proteus软件设计一个基于8086微处理器的简易温度计
    • ¥15 用联想小新14Pro
    • ¥15 multisim中关于74ls192n和DSWPK开关仿真图分析(减法计数器)
    • ¥15 基于8255的交通灯设计
    • ¥15 w3wp,exe 中发生未处理的 Microsoft ,NETFramework 异常。
    • ¥20 C51单片机程序及仿真(加减器)
    • ¥15 AQWA | 水动力分析 二阶波浪力
    • ¥15 c语言题目:成绩管理系统
    • ¥22 可否请教一下matlab未定义与 'double' 类型的输入参数相对应的函数 'finverse'是什么情况