0
我正在WCF电话和通过这段JavaScript代码找回数据在我的应用程序..调用WCF从代码隐藏Asp.net
function setCurrentResponseValue(response) {
var applicationData = null;
$.ajax({
type: "POST",
url: "ClientService.svc/REST/SetCurrentResponseValue",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ response: response }),
dataType: "json",
async: false,
success: function (msg) {
applicationData = msg;
},
error: 'An Error'
});
return applicationData;
}
我需要设置我的SVC文件从C#代码使用后面的会话变量。如何从后面的代码调用我的svc文件中的方法,而不是上面的ajax调用?