【发布时间】:2016-11-14 07:27:35
【问题描述】:
首先,repeater with in a repeater 可以用吗? 如果是,那么我如何在以下场景中使用嵌套中继器。
<div class="row">
<asp:Repeater ID="rp_Question" runat="server">
<ItemTemplate>
<p class="_100">
<h2 id="h4_Question" runat="server"><%# Eval("question_text") %></h2>
</p>
<p class="left">
<asp:RadioButtonList ID="rb_Question" runat="server">
<asp:ListItem Text="Option1" Value="1"></asp:ListItem>
<asp:ListItem Text="Option2" Value="2"></asp:ListItem>
<asp:ListItem Text="Option3" Value="3"></asp:ListItem>
<asp:ListItem Text="Option4" Value="4"></asp:ListItem>
</asp:RadioButtonList>
</p>
</ItemTemplate>
</asp:Repeater
中继绑定
rp_Question.DataSource = _question.GetAll();
rp_Question.DataBind();
每个问题的选项都保存在数据库中,最小选项可以是 3,最大可以是 6。如何使用 rp_Question 中的其他重复器来重复每个问题的选项。 我想这样展示。
【问题讨论】: