}
DataSet dsProduct = new DataSet();
string strQry = "Select * from ProductDet where ProductId in(select ProductId from ProductMaster where CatId = '1' and SubCatId='" + intSubCatId + "' and BrandId='" + intBrandId + "')";
dsProduct = db.GetTableDefinedDataSet(strQry, "Products");
if (dsProduct.Tables["Products"].Rows.Count > 0)
{
var query = dsProduct.Tables["Products"].AsEnumerable()
.GroupBy(x => x.Field<string>("ProductName").ToString())
.Select(x => x.First());
foreach (DataRow DistinctProducts in query)
{
// drpAvailableColours.Items.Add(new ListItem(DistinctProducts["ProductName"].ToString(), DistinctProducts["ColourCode"].ToString()));
new Products { Name = DistinctProducts["ProductName"].ToString(), ImageUrl = "~/Images/ART MATERIALS/" + DistinctProducts["ImageURL"].ToString(), WebSite = "temp.aspx?CatId=1&SubCatId=" + intSubCatId + "&BrandId=" + intBrandId };
}
ListView1.DataSource = ProdList;
ListView1.DataBind();