Hi,
I am trying to implement the same code that was mentioned in this question
Currently I have the following code:
var pagePath = window.location.pathname;
var paramList = '';
if (paramArray.length > 0) {
for (var i = 0; i < paramArray.length; i ++) {
if (paramList.length > 0) paramList += ',';
paramList += "{'id':'" + paramArray[i].id + "',
'collapsed':'" + paramArray[i].collapsed + "',
'order':'" + paramArray[i].order + "',
'column':'" + paramArray[i].column + "'}";
}
}
paramList = '[' + paramList + ']';
$.ajaxSetup({ cache: false });
//Call the page method
$.ajax({
type: "POST",
url: pagePath + "/" + fn,
contentType: "application/json; charset=utf-8",
data: "{'items': **'**" + $.toJSON(paramList) + "**'**}",
dataType: "json", success: successFn, error: errorFn });
I am trying to pass this data to the WebMethod
[WebMethod]
public static String SaveData(Dictionary<String, Object>[] items)
The problem is that I keep receiving the error "500 Internal Server Error". I'm pretty sure that the data type is causing the problem but just can't figure it out. Any ideas?