在数据列表中显示不在数据库中的图像

问题描述:

我在一家电子商务网站上工作..我有产品列表,这些列表显示在数据列表中,在该列表中还显示了一些出售的产品.我的要求是在售罄的产品上显示图像.请帮助我..

I''m working for an e-commerce website.. i have product list which are displayed in data list, in that list some of sold products are also displayed. my requirement is to display a image to the product which are sold-out. please help me..

<ItemTemplate>
< %#getSoldProductImages(Eval("CategoryId"))%>

</ItemTemplate>


protected string getSoldProductImages(object categoryId)
{
              Find all the soldout product image ref from database

StringBuilder strb=new StringBuilder() ;
      foreach(var img in imagelist)
{
    strb.append("< img src='path\"+img+"'>");
}
return strb.ToString()
}