Diciamo che ho una struttura di classe che sembra qualcosa di simile:dati principali di accesso in un nidificato ripetitore fortemente tipizzato
public class A
{
public string Poperty1 { get; set; }
public string Poperty2 { get; set; }
public List<B> Property3 { get; set; }
}
public class B
{
public string Property4 { get; set; }
public string Property5 { get; set; }
}
... e un paio di ripetitori nidificati che assomigliano a questo:
<asp:Repeater ItemType="A" runat="server">
<ItemTemplate>
<asp:Label Text="<%# Item.Property1 %>" runat="server" />
<asp:Repeater runat="server" DataSource="<%# Item.Property3 %>" ItemType="B">
<ItemTemplate>
<asp:Label Text="<%# Item.Property4 %>" runat="server" />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Come accedere alla Proprietà2 dal secondo ripetitore?
Significa DataSource = "<% # Item.Property3%>" invece di DataSource = "<% # Item.Property2%>" –
Sì, l'ho fatto. Grazie per averlo capito. –