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調用?