PDA

View Full Version : Only get 10 products back??


J0N3S3Y
01-02-09, 23:40
Im trying to return products based on a search term and I only get 10 products back (they are products related to my search criteria) - i'd expect more than this

Any ideas?


Code:

protected void btnSearch_Click(object sender, EventArgs e)
{
//get products for searched text
ProductService.ProductService swAPI = new ProductService.ProductService();

List<Product> swProductList = swAPI.GetProductsBySearchCriteria(new getProductList(), ProductListSortOption.lo, txtSearch.Text);

foreach (Product swProduct in swProductList)
{
Response.Write(swProduct.sDescription + "<br/><br/>");
}
}


in class file


public List<com.productserve.api.Product> GetProductsBySearchCriteria(getProductList objProductList, ProductListSortOption SortEnum, string strSearchCriteria)
{
ApiService Wsservice = new ApiService();
objProductList.sSort = SortEnum;
objProductList.sSortSpecified = true;
objProductList.sQuery = strSearchCriteria;

List<com.productserve.api.Product> ProductList = new List<global::com.productserve.api.Product>();
Wsservice.UserAuthenticationValue = GetUserAuthentication();
try
{
foreach (com.productserve.api.Product var in Wsservice.getProductList(objProductList).oProduct)
{
if (!ProductList.Contains(var))
{
ProductList.Add(var);
};
}
}
catch
{
//some error handling here
}
return ProductList;
}

J0N3S3Y
03-02-09, 15:04
It would help if i added iLimit