<asp:CheckBox ID="chkBox1" runat="server" Text="1" />
<asp:CheckBox ID="chkBox2" runat="server" Text="2" />
我有两个复选框,基于我需要运行查询并绑定到转发器控件的选择。
在中继器控制中:
<asp:Repeater runat="server" ID="Repeater1">
<HeaderTemplate >
<table class="list_table" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<th>1</th>
<th>2</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%=CheckBox1.Checked ? Eval("1") : "" %></td>
<td><%=CheckBox2.Checked ? Eval("2") : "" %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
AVD 建议我已经更改了我的编码,如果条件工作正常,但我需要将数据库中的数据绑定到转发器控件中。