Properties those you have to set to the textbox :
AutoCompleteMode : Suggest Append
AuoCompleteSource : CustomSource
These properties must set to the textbox that to which textbox you want to set the AutoCompleteMode.
Then only the code will be performs.
Event: This code should write in Page_Load event.
SqlCommand cmd = new SqlCommand("select name from databasetable", con);
SqlDataReader dr = cmd.ExecuteReader();
AutoCompleteStringCollection col = new AutoCompleteStringCollection();
while (dr.Read())
{
col.Add(dr.GetString(0));
}
textBox1.AutoCompleteCustomSource = col;
I hope this code will help you.
and also other link for your reference
http://www.c-sharpcorner.com/uploadfile/tajwerj/dynamically-fill-autocomplete-textbox-from-datagridview/[
^]