Home >Web Front-end >JS Tutorial >Jquery Ajax Learning Example 5 Makes a request to WebService and returns an asynchronous call of generic collection data_jquery

Jquery Ajax Learning Example 5 Makes a request to WebService and returns an asynchronous call of generic collection data_jquery

WBOY
WBOYOriginal
2016-05-16 18:32:151084browse
1. WebService.asmx:
Process business data and generate generic collection data in the GetList method for JqueryRequest.aspx to call. The code is as follows:
[WebMethod]
Copy code The code is as follows:

public List GetList()
{
List();
list.Add("aaaaaaaaaaaa");
list.Add("bbbbbbbbbbbb");
list.Add("cccccccccccc");
list.Add("dddddddddddd");
return list;
}

2. AjaxRequest.aspx
Request WebService.asmx by clicking the button GetList() method to obtain a generic collection. The code is as follows:
Copy code The code is as follows:

 
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn