1, XMLHttpRequest :
As a result of the browser war several years ago, we should create it's instance as follows:
1
var xmlHttpObject = null;
2
}
The function it provides:2
open():建立到服务器的新请求。send():向服务器发送请求。abort():退出当前请求。readyState:提供当前 HTML 的就绪状态。responseText:服务器返回的请求响应文本。
1
,
PS:
1
//queryString(arg) format the args to xxx&xxx&xxx..
2
request.send( this.queryString(requestParams) );
2
Also, we can use ScriptManager & This is more easy, the folowing is a sample use WebService:
1
<asp:ScriptManager ID="ScriptManager1" runat="server">
2
<Services>
3
<asp:ServiceReference Path="EmployeeService.asmx" />
4
</Services>
5
</asp:ScriptManager>
6
7
>
2
3
4
5
6
7
The Web Service, for example:
1
namespace AspNetAjaxOverview
2
}
2