protected void txt_name_TextChanged(object sender, EventArgs e) { string autoC = "select vendername from tbl_vendermaster"; SqlDataAdapter dtAuto = new SqlDataAdapter(autoC, con).Fill(dtAuto); GetAutoSourceCollectionFromTable(dtAuto); } private AutoCompleteStringCollection GetAutoSourceCollectionFromTable(DataTable table) { AutoCompleteStringCollection autoSourceCollection = new AutoCompleteStringCollection(); foreach (DataRow row in table.Rows) { autoSourceCollection.Add(row[0]); //assuming required data is in first column } return autoSourceCollection; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)