Not sure if this is a vb.net or datasource issue but am trying here.
I'm using vb.net and am having an issue when i try to send the updated data back to the server. I've found there to be a number of idiosyncrasies with connecting to .net so perhaps this is another one.
When I try to receive the data, it says it the method name isn't valid only when I try to assign the data to a variable. For example I'm able to send along a parameter to one function with an Int. And I can call the update function with no receiving parameter, but when I try to send along the data object it fails.
VB.Net code:
Works when accepting an int.
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _Public Function GetFullRecords(projectID as Integer) As List(Of fullRecords) return loadFullRecords(loadMonths(projectID), loadHeaders(projectID) , loadDetails(projectID) ) End FunctionAnd the broken one works fine if I don't accept anything
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _Public Function UpdateFullRecords() As String return "gotData"End Function
But as soon as I try to accept those records it fails
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _Public Function UpdateFullRecords(models as List(of fullRecords) ) As String return "gotData"End Function System.InvalidOperationException: UpdateFullRecords Web Service method name is not valid.
Datasource code:
dataSource = new kendo.data.DataSource( { transport: { read: { url: baseUrl + "gridData.asmx/GetFullRecords", type: "POST", contentType: "application/json; charset=utf-8", headers: {"Accept": "application/json"} }, update: { url: baseUrl + "gridData.asmx/UpdateFullRecords", type: "POST", dataType: "json" headers: {"Accept": "application/json"} }, parameterMap: function(options, operation) { if(operation === "read") var values = {projectID: 32}; return kendo.stringify(values); } else if (operation !== "read" && options.models) { console.log("Not Read - " + operation); return{fullRecords: kendo.stringify(options.models)}; } } }, schema: { parse: function (data) { return data.d; }, model: { id: "headerID", fields: mySchemaFields } } });Attached images from firebug showing that the data looks to be the same. So not sure why it can find the method in one instance and not the other.