\[code\] public class searchResult {public int id;public string name;}/// <summary>/// Summary description for WebService1/// </summary>[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][ToolboxItem(false)][System.Web.Script.Services.GenerateScriptType(typeof(searchResult))]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.[System.Web.Script.Services.ScriptService]public class WebService1 : System.Web.Services.WebService{[WebMethod]public searchResult[] Search(int txtSearch){//Semuler to slow internet connectionSystem.Threading.Thread.Sleep(2000);//Declare collection of searchResultList<searchResult> resultList = new List<searchResult>();DataSet ds = Classes.getEmployeeDetailSet("SELECT [Employee ID],[First Name] FROM [Employee$] WHERE [Employee ID] like '" + txtSearch + "%'");DataTable dt = new DataTable();dt = ds.Tables[0];if (dt.Rows.Count > 0){searchResult result = new searchResult();result.id = int.Parse(dt.Rows[0]["Employee ID"].ToString());result.name = dt.Rows[0]["First Name"].ToString();resultList.Add(result);}return resultList.ToArray();}\[/code\]i have created a list like \[code\] List<searchResult> resultList = new List<searchResult>(); this and i have return that list to call this i have use ajax code like this $.ajax({ type: "POST", url: "WebService1.asmx/Search", //function that in web service data: "{txtSearch:" + $("#txtSearch").val() + "}", // passing value of txtSearch input contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { var result = response.d; var valuehttp://stackoverflow.com/questions/12618044/= ''; $.each(result, function(index, res) { value = http://stackoverflow.com/questions/12618044/value + res.id + res.name; }); alert(value); alert("Record was updated successfully,,"); }, error: function(msg) { alert("Error while calling web service,,"); } });\[/code\]My problem is that I am getting only one element from the database I think I am not able to separate the list in the ajax response here\[code\] $.each(result, function(index, res) { value = http://stackoverflow.com/questions/12618044/value + res.id + res.name; });\[/code\]I want to create a array with use of this id+nameplease help