Dynamicweb 8 Documentation
ProductRelatedCollection Class
Members  Example 

Represents a collection of ProductRelated objects.
Object Model
ProductRelatedCollection ClassProductRelated Class
Syntax
Example
class MyPage : System.Web.UI.Page
{
    public string RelatedProdList(string productId, string groupId)
   {
        StringBuilder sb = new StringBuilder();
        ProductRelatedCollection rpCol = ProductRelated.getRelatedProducts(productId, groupId);
        int fldCnt = rpCol.Count;

        sb.Append("<select size=" + fldCnt + 1 + " id='ElemSort" + groupId + "' name='ElemSort" + groupId + "' style=\"width:400px;\" onChange=\"ToggleImage(this.selectedIndex,'" + groupId + "');\">");
        foreach (ProductRelated rp in rpCol)
        {
            sb.Append("<option value=\"" + rp.ProdRelID + "\">" + rp.Product.Name + "</option>");
        }
        sb.Append("</select>");
        return sb.ToString();
    }
}
Inheritance Hierarchy

System.Object
   System.Collections.ObjectModel.Collection<T>
      Dynamicweb.eCommerce.Products.ProductRelatedCollection

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ProductRelatedCollection Members
Dynamicweb.eCommerce.Products Namespace

Send Feedback