using System; using System.Web.Services; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Configuration; /**////<summary> /// Summary description for WebServiceSearchName ///</summary> [System.Web.Script.Services.ScriptService] [WebService(Namespace ="http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] publicclass WebServiceSearchName : System.Web.Services.WebService ...{ public WebServiceSearchName () ...{ //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] publicstring[] GetCompletionList(string prefixText, int count) ...{ if (count ==0) ...{ count =10; } Random random =new Random(); List<string> items =new List<string>(count); for (int i =0; i < count; i++) ...{ char c1 = (char)random.Next(65, 90); char c2 = (char)random.Next(97, 122); char c3 = (char)random.Next(97, 122); items.Add(prefixText + c1 + c2 + c3); } return items.ToArray(); } }