Here is my code
MinimumPrefixLength="2" UseContextKey="false">
AutoComplete.asmx
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;
using System.Web.Script.Services;
using System.Data;
using Businesslogic;
[System.Web.Script.Services.ScriptService]
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
public class AutoComplete : System.Web.Services.WebService
{
[WebMethod]
public string[] GetPartyName(string prefixText)
{
Businesslogic.BLInquiry objInq;
objInq = new BLInquiry();
//MySQLConnection con = new MySQLConnection();
// string qry = "SELECT column_name FROM table_name WHERE column_name LIKE '%" + prefixText + "%' ";
DataSet ds = new DataSet();
ds = objInq.GetPartyName(prefixText);
string[] items = new string[ds.Tables[0].Rows.Count];
int i = 0;
try
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
items.SetValue(dr["PartyName"].ToString(), i);
i++;
}
}
catch (Exception err)
{
throw err;
}
return items; //i m getting all the item in array
}
}
Please tell me what's wrong with my code.

Satish BhatRank #2,496 · 563 reputationPosted Jul 28, 2011, 2:05 AM EDT
Satish BhatRank #2,496 · 563 reputationPosted Jul 28, 2011, 1:14 AM EDT
Also test the Web service in a browser to see it is returning values.
yogita dhingra31 reputationPosted Jul 28, 2011, 1:31 AM EDT
yogita dhingra31 reputationPosted Jul 28, 2011, 2:26 AM EDT
Satish BhatRank #2,496 · 563 reputationPosted Jul 28, 2011, 3:46 AM EDT