I'm testing databinds in ASP.NET with C# Visual Studio. But I've a irritating problem... To show all products from a database I use a repeater with a datasource query. The query is:
SELECT titel, prijs, Product.artikelnummer, bestandnaam FROM Product INNER JOIN (Foto INNER JOIN Productfoto ON Foto.[foto_id] = Productfoto.[foto_id]) ON Product.[artikelnummer] = Productfoto.[artikelnummer] ORDER BY titel;
Because artikelnummer exist in multiple tables, I must write the table name before it. But when I'll load the data in a repeater, single names work, like:
DataBinder.Eval(Container.DataItem, "bestandnaam")
But when I use the "artikelnummer":
DataBinder.Eval(Container.DataItem, "Product.artikelnummer")
I get a error: DataBinding: 'System.Data.Common.DataRecordInternal' does not contain a property with the name 'Product'.
How could I read the artikelnummer? It is important for me because the product_detailview will load his data from the article number(artikelnummer in dutch)
Anyone??