try this in your aspx page
<asp:TextBox ID="Item_Name" runat="server" Width="200px"
ontextchanged="Item_Name_TextChanged" AutoPostBack="True" TabIndex="2"></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" CompletionInterval="500" MinimumPrefixLength="1" ServiceMethod="Getdata"
TargetControlID="Item_Name" UseContextKey="True">
</asp:AutoCompleteExtender>
and in .cs do as below
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] Getdata(string prefixText, int count, string contextKey)
{
SqlConnection con1 = new SqlConnection(Connection.getConnectionString());
con1.Open();
DataTable dt = new DataTable();
SqlCommand cmd = new SqlCommand();
SqlDataAdapter adap = new SqlDataAdapter("Your sql query for suggesstion, con1);
adap.Fill(dt);
string[] main = new string[0];
int j = dt.Rows.Count; //ds.Tables["Ledger_Master"].Rows.Count;
for (int i = 0; i < j; i++)
{
//if (ds.Tables[0].Rows[i].ItemArray[0].ToString().ToLower().StartsWith(prefixText.ToLower()))
if (dt.Rows[i].ItemArray[0].ToString().ToLower().Contains(prefixText.ToLower()))
{
Array.Resize(ref main, main.Length + 1);
//main[main.Length - 1] = ds.Tables[0].Rows[i].ItemArray[0].ToString();
main[main.Length - 1] = dt.Rows[i].ItemArray[0].ToString();
if (main.Length == 15)
break;
}
} con1.Close();
Array.Sort(main);
return main;
}