首先,可以使用中繼器中的中繼器嗎? 如果是,我可以在以下情況下使用嵌套中繼器。如何使用RadioButtonList中的Repeater重複RadioButtonList的ListItem
<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重複每個問題的選項。 我想展示出這樣。
可以請你分享一些代碼來綁定'asp:RadioButtonList'放置在中繼器內嗎? –