I have created a WCF Data Service that (amongst other things) contains a WebGet Method which accepts a string parameter. How do I send this parameter from kendoUI Mobile?
WebMethod:
[WebGet]
public IEnumerable<T> GetData(string str)
{
var linqQuery = from x in Products
where productName == str
select x;
return linqQuery;
}
I am trying to call the webmethod as follows:
function GetProduct(name) {
$("#product-listview").kendoMobileListView({
dataSource: {
transport: {
read: {
contentType: "application/json; charset=utf-8",
url: "http://ProductDataService.svc/GetData",
dataType: "json",
data: {param: name }
}
},
schema: {
data: "d"
},
parameterMap: function (options) {
kendo.ui.progress($("#product-listview"), false);
return kendo.stringify(options);
}
},
template: $("#product_template").text()
});
}
This returns no data, and no error. Can anyone help?
WebMethod:
[WebGet]
public IEnumerable<T> GetData(string str)
{
var linqQuery = from x in Products
where productName == str
select x;
return linqQuery;
}
I am trying to call the webmethod as follows:
function GetProduct(name) {
$("#product-listview").kendoMobileListView({
dataSource: {
transport: {
read: {
contentType: "application/json; charset=utf-8",
url: "http://ProductDataService.svc/GetData",
dataType: "json",
data: {param: name }
}
},
schema: {
data: "d"
},
parameterMap: function (options) {
kendo.ui.progress($("#product-listview"), false);
return kendo.stringify(options);
}
},
template: $("#product_template").text()
});
}
This returns no data, and no error. Can anyone help?