or
public
string
TestCallParam(
string
param)
{
return
"you passed: "
+ param;
}
$(document).ready(
function
() {
$(
"#TextBox1"
).text(
"Starting"
);
var
args =
new
Object();
args.param =
"HI"
;
$.ajax({
type:
"POST"
,
url:
"cccjq.svc/TestCallParam"
,
contentType:
"application/json; charset=utf-8"
,
data: JSON.stringify(args),
dataType:
"json"
,
processdata:
false
,
success:
function
(msg) {
alert(msg.TestCallParamResult);
},
error: ServiceFailed
});
})
function
ServiceFailed(result) {
alert(
'Service call failed.\r\nStatus = '
+ result.status +
'.\r\n'
+ result.statusText);
}
$(document).ready(
function
() {
$(
"#TextBox1"
).text(
"Starting"
);
var
args =
new
Object();
args.param =
"HI"
;
var
ds =
new
kendo.data.DataSource({
transport: {
read: {
type:
"POST"
,
url:
"cccjq.svc/TestCallParam"
,
contentType:
"application/json; charset=utf-8"
,
dataType:
'json'
},
parameterMap:
function
(options, operation) {
return
JSON.stringify(args);
}
},
schema: {
data:
"TestCallParamResult"
,
type:
'json'
},
change:
function
(e) {
alert(x);
},
error:
function
(e) {
// dont know if this is right either
alert(
'Service call failed.\r\nStatus = '
+ e.status +
'.\r\n'
+ e.statusText);
}
});
ds.read();