Posted on: 10/17/2013 5:29:18 AM | Views : 701

I have one autoextender I want serach result come with the condition
my code is
[System.Web.Script.Services.ScriptMethod()] [System.Web.Services.WebMethod] public static List<string> GetCountries(string prefixText) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["BMS"].ToString()); con.Open(); SqlCommand cmd = new SqlCommand("select * from tbl_new_supplier where SupplierName like @Name+'%' Supp_id=3 ", con); cmd.Parameters.AddWithValue("@Name", prefixText); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); List<string> CountryNames = new List<string>(); for (int i = 0; i < dt.Rows.Count; i++) { CountryNames.Add(dt.Rows[i][1].ToString()); ...

Go to the complete details ...