Display Manufacturer Info

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
i found a problem here, i think.. if not value is asigned to a x product manufacturer.. visual studio shows me an error.

did i explain myself?

sorry about the language, im not much of a developer.. yet.
14 years ago
i found a problem here.

if the product is not asigned to a manufacturer, visual 2008 gives me an error.

cant find: "ArgumentOutOfRangeException" the index is outside the interval. Must be a negative value or minor than the size of the collection.

..

but, if the product has a value in manufacturer.. the Error doesnt shows up... i suppose that if there were no variants something similar would happen.



im using..


            //sku
            lSKU.Text = product.ProductVariants[0].SKU;

            lManufacturerPartNumber.Text = product.ProductVariants[0].ManufacturerPartNumber;


            lManufacturerName.Text = product.ProductManufacturers[0].Manufacturer.Name;

and


            
            <div class="sku-home">
                <asp:Literal ID="lSKU" runat="server"/>
            </div>
            

             <div class="ManufacturerPartNumber">
                <asp:Label ID="lManufacturerPartNumber" runat="server" />
             </div>
            
             <div class="ManufacturerName">
                <asp:Label ID="lManufacturerName" runat="server" />
             </div>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.