【发布时间】:2013-06-14 08:26:36
【问题描述】:
我正在使用嵌套中继器在表格中动态构建单选按钮列表:
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblAccID" runat="server" Text='<%# Eval("id") %>'></asp:Label>
</td>
<td>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("name") %>'></asp:Label>
</td>
<td>
<%-- POPULATE CONDITION RADIO BUTTONS --%>
<asp:Repeater ID="rpConditionRadioButtons" runat="server">
<ItemTemplate>
<td>
<asp:RadioButton ID="rbCondition" GroupName="gCondition" Text="" runat="server" />
</td>
</ItemTemplate>
</asp:Repeater>
</td>
</tr>
</ItemTemplate>
但我不知道如何将它们组合在一起。 (因为表格是动态构建的,所以我认为我不能使用单选按钮列表。)
我尝试使用 GroupName 属性,并将 ClientIDMode 设置为静态,但这没有帮助。
【问题讨论】:
-
我遇到了相反的问题 - 而不是所有单选按钮都在转发器中的所有行中分组,它们是独立运行的。
标签: c# asp.net radio-button