Jquery Datatables with asp.net asmx web services

Jquery Datatables with asp.net asmx web services

almightyalmighty Posts: 8Questions: 0Answers: 0
edited May 2013 in DataTables 1.8

I know there are lot of post already there related to this but i am newbie who tried help from those post but in vain.
I have asmx web which i am able to call through my normal jquery ajax call.

this is how my service looks like.

public List GetExpiryRules(string culture, string affiliateId, string selectedPackages, string intervals)
CatalogBl objCatalogBl = new CatalogBl();
AffiliateInfo affinfo = objCatalogBl.GetAffiliate(int.Parse(affiliateId), true);

string accurevUserName = ConfigurationManager.AppSettings["AccurevUserName"];
string sourceStream = ConfigurationManager.AppSettings["AccurevSourceStream"];
string affiliate = affinfo.AffiliateCode;

Boolean l_IsExists = FileExistanceValidator.DoesThisFileExist(culture, affiliate, affiliateId);

and this is how how my client code looks like
$('#getExpiryRules').live('click', function () {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": '../Services/WebServices.asmx/GetExpiryRules',
"sAjaxDataProp": "d", "sPaginationType": "full_numbers", "bDestroy": true, "bAutoWidth": false,
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({ "culture": "en-us", "affiliateId": 0, "selectedPackages": "selectedPackages", "intervals": "intervals" });
type: "POST",
data: aoData,
dataType: "json",
url: sSource,
contentType: "application/json; charset=utf-8",
success: success
function success(json) {

1. i am using jquery-1.6.4.min.js version.
2. the response from the service is not json serialised yet (will do it after atleast services get hit)
3. what am i doing wrong here
4. the error that i get on the firefox console is {"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}

Any help or guidance in the right direction would be much appreciated.


  • almightyalmighty Posts: 8Questions: 0Answers: 0
    On e more thing is in post i am seeing all these attributes appended. I know these are being appended by jquery.datatables

    why the last attribute is undefined and are we supposed to have all these attributes at the server side too.
  • almightyalmighty Posts: 8Questions: 0Answers: 0
    After much effort i am able to get the response back from the server but the still getting error on the client side while painting the table
    [quote]Requested unknown parameter '1' from the data source for row 0[/quote]

    My json response coming from asp.net webservice is

    [/code] which seems to be correct as its an array of objects. Can anyone guide me here?
  • almightyalmighty Posts: 8Questions: 0Answers: 0
    Solved it.
This discussion has been closed.