0
這裏是我的代碼,我使用從網絡服務中獲取數據: -沒有獲得成功,從煎茶觸摸調用asp.net web服務
Ext.onReady(function(){
var url = "http://192.168.1.15/JSONDemo/Service1.asmx/getString";
Ext.Ajax.request({
method: 'get',
url: url,
// params: {'name':'himanshu'},
jsonData: { 'name': 'Himanshu'},
// headers: { 'Content-Type': 'application/xml; charset=utf-8' },
success: function (response, request) {
alert('Working!')
alert(response.responseText)
console.log('Response:-'+response.responseText)
},
failure: function (response, request) {
alert('Not working!')
console.log('Response Status:-'+response.status)
}
});
});
我的.NET Web服務代碼是在這裏: -
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true)]
public string getString(string name)
{
return "Hello "+name;
}
我沒有得到這個代碼'0'響應status.Please幫助我擺脫問題的反應。