1->n relation display question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm a little bit confused as what is the bes way to achieve the following:
I have 2 database tables, table 1 product en table 2 image. For every
product record there can be 0-1 or more image records.

My question:
What is the best way to display the product record with the respective image
record(s)? Using a FormView for the product record and a GridView/DataList
for the image record(s)?
Or, writing own code (using Table, Row, Cells and within the cells the
controls like FileUpload, TextBox, ...) to save, edit, delete the data in the
two tables?

Thanks for your suggestions.
 
I mean, the example KB I sent... they are using a Repeater as the control
with the nested data.


This is code from the KB

<asp:repeater id="childRepeater"
runat="server" datasource='<%#
Container.DataItem.Row.GetChildRows("myrelation") %>'>

<itemtemplate>
<%# Container.DataItem("title_id") %><br>
</itemtemplate>
</asp:Repeater>



Change this to a <asp:formview

but keep the datasource= ... syntax
 
Back
Top