Thanks Kaplesh ..
I'm have to use your Example and it work excellently.
I just add some code to cs to load data from DataBase
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod()]
public static string[] GetSections(string prefix)
{
List<string> Sections = new List<string>();
using (SqlConnection conn = new SqlConnection())
{
conn.ConnectionString = ConfigurationManager
.ConnectionStrings["conn"].ConnectionString;
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "select section from sections where " +
"section like @SearchText + '%'";
cmd.Parameters.AddWithValue("@SearchText", prefix);
cmd.Connection = conn;
StringBuilder sb = new StringBuilder();
conn.Open();
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
Sections.Add(sdr["section"].ToString());
}
}
conn.Close();
}
}
return Sections.Where(f => f.ToLower().IndexOf(prefix.ToLower()) != -1).ToArray();
}
Thanks Again Mr. Kaplesh