public string[] GetClientList(string prefixText)
{
DataSet dtst = new DataSet();
SqlConnection sqlCon = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
string strSql = "SELECT distinct CLIENT_NAME as CLIENT,CLIENT_ID FROM CLIENT_MASTER WHERE CLIENT_NAME LIKE '" + prefixText + "%' and IS_DELETED=0 ";
SqlCommand sqlComd = new SqlCommand(strSql, sqlCon);
sqlCon.Open();
SqlDataAdapter sqlAdpt = new SqlDataAdapter();
sqlAdpt.SelectCommand = sqlComd;
sqlAdpt.Fill(dtst);
string[] cntName = new string[dtst.Tables[0].Rows.Count];
int[] cntID = new int[dtst.Tables[0].Rows.Count];
int i = 0;
try
{
foreach (DataRow rdr in dtst.Tables[0].Rows)
{
cntName.SetValue(rdr["CLIENT"].ToString(), i);
cntID.SetValue(Convert.ToInt32(rdr["CLIENT_ID"]), i);
cid = cntID[i];
Session["CLIENT_ID"] = cid;
i++;
//Cid =Convert.ToInt32(cntID);
}
}
catch { }
finally
{
sqlCon.Close();
}
return cntName;
// return cntID;
}
using this query i can find the client name whwatever i type in the textbox suppose i type "a" it populate the list of word start from "a", but when i type "ab" it populate the word start from "ab" but not this type of word "ai bal"how to do tht