Datatable Editor Ajax Post Update Data with Parameters
Datatable Editor Ajax Post Update Data with Parameters

Hi,
I'am trying to implement datatable editor with asmx web service.
I'm not using web api or mvc.
Can I send parameters to my asmx update method?
function initTroubleshootingData(t, n, table) {
var editor = new $.fn.dataTable.Editor({
ajax: {
create: {
type: 'POST',
url: 'http://localhost:60814/TroubleshootingWS.asmx/GetTroubleshootingDataForOfflineUse'
},
edit: {
type: 'POST',
contentType: 'application/json',
url: 'http://localhost:60814/TroubleshootingWS.asmx/UpdateTroubleshootingData',
//data: function (d) {
// var newdata;
// $.each(d.data, function (key, value) {
// newdata = JSON.stringify(value);
// });
// return newdata;
//}
data:{x:"test"}
},
remove: {
type: 'DELETE',
url: 'http://localhost:60814/TroubleshootingWS.asmx/GetTroubleshootingDataForOfflineUse'
}
},
idSrc: "TS_ID",
table: "#tbTroubleshooting",
fields: [{
label: "TS_ID:",
name: "TS_ID"
}, {
label: "TS_DEFECT:",
name: "TS_DEFECT"
}, {
label: "TS_DEFECTIMAGE:",
name: "TS_DEFECTIMAGE"
}, {
label: "TS_AREA:",
name: "TS_AREA"
}, {
label: "TS_EQUIPMENT:",
name: "TS_EQUIPMENT"
}, {
label: "TS_REASON:",
name: "TS_REASON"
}, {
label: "TS_OPERATOR_DECISION:",
name: "TS_OPERATOR_DECISION"
}
, {
label: "TS_PHOTO:",
name: "TS_PHOTO"
}
]
});
Thanks,
This discussion has been closed.
Answers
Any comment?
The documentation here shows how it can be used with WebForms / ASPX. I'm assuming that ASMX can operate in a similar way - how do you normally access POST parameters in an ASMX page?
Allan