Posted on: 9/22/2015 1:53:00 PM | Views : 817

Hi I have created customer class that contain the following method
public DataTable SearchCustomers(string Field, string Value) { string query = string.Format("select ContactName from Customers where {0} like'%{1}%'", Field, Value); return Search(query); } But it returns Data table how can i apply it  to code down below
public static List<string> SearchCustomers(string prefixText, int count) { using (SqlConnection conn = new SqlConnection()) { conn.ConnectionString = ConfigurationManager .ConnectionStrings["constr"].ConnectionString; using (SqlCommand cmd = new SqlCommand()) { cmd.CommandText = ...

Go to the complete details ...