Posted on: 9/15/2014 2:24:07 AM | Views : 438

hi all, My english is not enough good that is way i cant tell you in detail. I hope you got my point friends im working on asp.net project. Im using jQuery Autocomplete plugin for search product with images. I wrote webservice for this . i adding number of rows in an variable but   It retruns only last row instead of all list of products.

CS
[WebMethod]public List<Products> GetProductName(string ProductName) { List<Products> productName = new List<Products>(); Products products = new Products(); string conStr = "Data Source=localhost;Initial Catalog=My_Products;Integrated Security=True"; using (SqlConnection con = new SqlConnection(conStr)) { string query = "Select * from Products where Product_Name Like @ProductName + '%'"; SqlCommand cmd = new ...

Go to the complete details ...