H
Howard
I need to generated a table from data from 2 database tables.
1st table CATEGORY consists of
CATID|CATEGORYNAME|
2nd table is ITEM
ID|CATEGORYID|NAME|
The html output shoud look like this
Category 1
1. Item
2. Item
Category 2
3. Item
4. Item
Category 3
5. Item
6. Item
....
I tried to use the reapeater control, everything seemed to work perfectly,
but theres one problem. I cannot pass data to the child repeater. The
control doesn't take dynamic variables.
the child repeater doesn't know which parent category they belong to.
<asp:repeater id=parent datasourceid=ds1 runat=server>
<itemtemplate><%# Eval("CATEGORYNAME")%>
<asp:repeater id=childdatasourceid=ds2 runat=server>
<itemtemplate><%# Eval("ID")%>. <%# Eval("NAME")%></itemteplate>
</asp:repeater>
</itemteplate>
</asp:repeater>
1st table CATEGORY consists of
CATID|CATEGORYNAME|
2nd table is ITEM
ID|CATEGORYID|NAME|
The html output shoud look like this
Category 1
1. Item
2. Item
Category 2
3. Item
4. Item
Category 3
5. Item
6. Item
....
I tried to use the reapeater control, everything seemed to work perfectly,
but theres one problem. I cannot pass data to the child repeater. The
control doesn't take dynamic variables.
the child repeater doesn't know which parent category they belong to.
<asp:repeater id=parent datasourceid=ds1 runat=server>
<itemtemplate><%# Eval("CATEGORYNAME")%>
<asp:repeater id=childdatasourceid=ds2 runat=server>
<itemtemplate><%# Eval("ID")%>. <%# Eval("NAME")%></itemteplate>
</asp:repeater>
</itemteplate>
</asp:repeater>