Ajax call .net web service
Ajax call .net web service
deadmask
Posts: 3Questions: 0Answers: 0
Hi,
i used a Server-Side processing to load a data. When I call my .net Web Service, return this error :
DataTable warning : table id=example -Ajax error. For more information about this error, please see http://datatables.net/tn/7
But I don't understand this error.
This is my code
$('#example').dataTable( {
"processing": true,
"serverSide": true,
"ajax": "WebService.asmx/GetData"
} );
Can you help me?
Thanks
This discussion has been closed.
Replies
It's explained in the link: http://datatables.net/tn/7
You should follow the explanation to find out what status code was returned by the ajax request.
500 Internal Error is the error.
Error description :
If I call the WebMethod with Jquery ajax i have a positive return.
Code :
I also decorated my WebService with <System.Web.Script.Services.ScriptService()>.
Sounds like there might be a routing problem, or if you need to add the
contentType
header,t hen you can useajax
as an object and pass the option in.Allan
I solved this problem. The error was due to the configuration of the call to the WebMethod.
This is the correct code :
Now, I have a new error : -.-
I followed this guide : http://datatables.net/manual/server-side, for set the input parameters.
This is the first definition of the method that i used:
This is the second:
And this is the last :
Can you help (again) me?
Thanks