Last week i learned about auto-complete property of text box.so i want to share it with all of you so that it can help you as well. First declare following global variables. AutoCompleteStringCollection collection = new AutoCompleteStringCollection(); private string strConnection =System.Configuration.ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString; SqlConnection conn = new SqlConnection(); After that i have made a function public void AutoComplete() { SqlDataReader dReader; conn.ConnectionString = strConnection; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select * from test"; conn.Open(); dReader = cmd.ExecuteReader(); if (dReader.HasRows == true) { while (dReader.Read())