Repeater嵌套,CheckBox选择问题,请帮助

hejiwang hejiwang 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
页面代码如下:
<asp:Repeater runat="server" ID="objRepeater" OnItemDataBound="objRepeater_ItemDataBound">
<HeaderTemplate>
<table class="Grid" border="1" cellspacing="0" style="width: 900px;">
<tr>
</tr>
<th>
省份
</th>
<th>
市
</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<asp:CheckBox ID="chkPrve" name="chkPrve" runat="server" />
</td>
<td>
<asp:Repeater ID="repShopInfo" runat="server">
<ItemTemplate>
<asp:CheckBox ID="chkCity" name="chkCity" runat="server" /> </ItemTemplate>
</asp:Repeater>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>

左边为省份代码,右边为本省的所有城市,如果点击一个省份的checkbox选中此省份下所有城市city的checkbox

后台如果获取选中的值。
...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
hejiwang
.NET社区 62,271 成员 668,968 内容