在Repeater里面的使用CheckBox 的问题
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="rep_table">
<tr class="rep_alternating">
<th class="rep_td" style="width:50px" >
<asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged"/></th>
<th class="rep_td">
序号</th>
<th class="rep_td">
用户名称</th>
<th class="rep_td">
用户账号</th>
<th class="rep_td">
联系电话</th>
<th class="rep_td">
EMAIL</th>
<th class="rep_td">
用户类型</th>
<th class="rep_td">
操作</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr onmouseover="rep_mo(this)" onmouseout="rep_mout(this,true)" class="rep_normal">
<td>
<asp:CheckBox ID="CheckBox2" runat="server" /> </td>
<td class="rep_td" align="center" style="width:50px">
<%# Eval("VC_ID")%>
</td>
<td class="rep_td" align="left" style="width:300px">
<%# Eval("VC_YHMC")%>
</td>
<td class="rep_td" align="left" style="width:150px">
<%# Eval("VC_YHZH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_LXDH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_EMAIL")%>
</td>
<td class="rep_td" align="center" style="width:160px">
<%# Eval("I_LX")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<a href="mod_userinfor.aspx?id=<%# Eval("VC_ID")%>" target="_self"><img src="../img/edit.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
<a href="#"><img src="../img/default_set.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr onmouseover="rep_mo(this)" onmouseout="rep_mout(this,false)" class="rep_alternating">
<td>
<asp:CheckBox ID="CheckBox2" runat="server" /> </td>
<td class="rep_td" align="center" style="width:50px">
<%# Eval("VC_ID")%>
</td>
<td class="rep_td" align="left" style="width:300px">
<%# Eval("VC_YHMC")%>
</td>
<td class="rep_td" align="left" style="width:150px">
<%# Eval("VC_YHZH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_LXDH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_EMAIL")%>
</td>
<td class="rep_td" align="center" style="width:160px">
<%# Eval("I_LX")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<a href="mod_userinfor.aspx?id=<%# Eval("VC_ID")%>" target="_self"><img src="../img/edit.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
<a href="#"><img src="../img/default_set.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
当我选中CheckBox1的时候checkbox2 如何全部选中了啊(就是全选 checkbox1是总选,checkbox2是每条信息选中 )
我用CheckBox1_CheckedChanged 事件 好像是找不到 checkbox2的ID
checkbox2 有很多 我选中它又如何得到它的值(ID)啊? 因为我还要删除
在Repeater里面的使用CheckBox 我用的很少 不太清楚啊!<HeaderTemplate>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="rep_table">
<tr class="rep_alternating">
<th class="rep_td" style="width:50px" >
<asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged"/></th>
<th class="rep_td">
序号</th>
<th class="rep_td">
用户名称</th>
<th class="rep_td">
用户账号</th>
<th class="rep_td">
联系电话</th>
<th class="rep_td">
EMAIL</th>
<th class="rep_td">
用户类型</th>
<th class="rep_td">
操作</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr onmouseover="rep_mo(this)" onmouseout="rep_mout(this,true)" class="rep_normal">
<td>
<asp:CheckBox ID="CheckBox2" runat="server" /> </td>
<td class="rep_td" align="center" style="width:50px">
<%# Eval("VC_ID")%>
</td>
<td class="rep_td" align="left" style="width:300px">
<%# Eval("VC_YHMC")%>
</td>
<td class="rep_td" align="left" style="width:150px">
<%# Eval("VC_YHZH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_LXDH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_EMAIL")%>
</td>
<td class="rep_td" align="center" style="width:160px">
<%# Eval("I_LX")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<a href="mod_userinfor.aspx?id=<%# Eval("VC_ID")%>" target="_self"><img src="../img/edit.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
<a href="#"><img src="../img/default_set.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr onmouseover="rep_mo(this)" onmouseout="rep_mout(this,false)" class="rep_alternating">
<td>
<asp:CheckBox ID="CheckBox2" runat="server" /> </td>
<td class="rep_td" align="center" style="width:50px">
<%# Eval("VC_ID")%>
</td>
<td class="rep_td" align="left" style="width:300px">
<%# Eval("VC_YHMC")%>
</td>
<td class="rep_td" align="left" style="width:150px">
<%# Eval("VC_YHZH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_LXDH")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<%# Eval("VC_EMAIL")%>
</td>
<td class="rep_td" align="center" style="width:160px">
<%# Eval("I_LX")%>
</td>
<td class="rep_td" align="left" style="width:160px">
<a href="mod_userinfor.aspx?id=<%# Eval("VC_ID")%>" target="_self"><img src="../img/edit.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
<a href="#"><img src="../img/default_set.gif" style="text-decoration:none;color:#000000;border:0;" alt=""/></a>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
当我选中CheckBox1的时候checkbox2 如何全部选中了啊(就是全选 checkbox1是总选,checkbox2是每条信息选中 )
我用CheckBox1_CheckedChanged 事件 好像是找不到 checkbox2的ID
checkbox2 有很多 我选中它又如何得到它的值(ID)啊? 因为我还要删除
...全文
相关推荐
【ASP.NET编程知识】浅析Repeater控件的使用 (原样导出和动态显示隐藏Repeater中的列).docx
【ASP.NET编程知识】浅析Repeater控件的使用 (原样导出和动态显示隐藏Repeater中的列).docx
asp.net Repeater取得CheckBox选中的某行某个值
Repeater取得CheckBox选中的某行某个值的实现代码
asp.net Repeater取得CheckBox选中的某行某个值的c#写法
asp.net(c#)利用Repeater取得CheckBox选中行的某个值的代码
DataView或Repeater中的ASP.NET CheckBox命令
介绍一种非常简单的方法,说明如何以类似于Button的方式在GridView或Repeater中使用CheckBox。
asp.net使用Repeater控件中的全选进行批量操作实例
主要介绍了asp.net使用Repeater控件中的全选进行批量操作方法,实例分析了Repeater控件的使用技巧,需要的朋友可以参考下


