@@@@@@@@@急急急急急急急急急急急急数@@@@据绑定控件Repeater中如何在后台或前台获取每一页有被选中的复选框 点击翻页后 页面会刷新 这样你钩选的Checked==false了,我想你完成的这种翻页时 每页都有被钩选的效果,是通过用Session把每页被钩选的记住?还是在绑定方法中已经写好的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 wojiushi594() ( ) 信誉:100 2007-08-24 09:03:47 得分: 0 就是每一页都有选中的数据便于同时修改或删除操作嘛------------------------------------------------------------------我觉得这样并不便于用户 删除修改 这样可能还会产生用户的误操作,而且还给你代码量增加,真不如让用户自己钩选个人意见 循环遍历啊找到选中的id,就OK了 我平时不用Repeater控件 都用datagrid gridview 和datalist 但方法都一样 凑合给你写了一个foreach (RepeaterItem ri in Repeater1.Items) { CheckBox chk = (CheckBox)ri.FindControl("CheckBox1"); if (chk.Checked) { ... } } 用GridView可以这样 //foreach (GridViewRow in gv_Information.Rows) //{ // CheckBox ch = (CheckBox)gr.Cells[0].FindControl("CheckAll"); // if (ch.Checked == true) // { // //int adjustementid = Convert.ToInt32(gr.Cells[0].Text); // //bllajust.Delete(adjustementid); // } //}那Repeater了? protected void Rpt_DataItemDound(object sender,RepeaterItemArges e) { int index=e.Item.ItemIndex; if(Rpt.Item[index].FindControl("checkBox").Checked) { ......... } } 可以看下这个http://topic.csdn.net/t/20060106/14/4501905.html foreach( RepeaterItem item in repProduct.Items ){ CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx"); if( chProTypeEx.Checked == true ) { }} foreach( RepeaterItem item in repProduct.Items ){ CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx"); if( chProTypeEx.Checked == true ) { }}未将对象的引用设置到对象的实例 <asp:CheckBox ID="cb_sjs" runat="server" Checked='<%#Eval("是否选中")=="是"?true:flase %>' /> repeater 嵌套的分页 简单正则 图片轮换怎么做?? 今天网站的流量有些异常,不知道有什么工具可以看到哪些文件正在被下载的? ASP.NET中如何修改地址栏、收藏夹的图标 关于PhotoShop和VB.NET(ASP.NET)结合问题 datagrid分行问题 谁能详细说下,如果打包webservice以及webapplication? 问题求解决 我要取datagrid列中的值,该怎么办?大家帮我看看,很急! 各位大虾帮帮忙!求救,在线等! DataGrid中怎么把按钮列放到最后一列?
就是每一页都有选中的数据便于同时修改或删除操作嘛
------------------------------------------------------------------
我觉得这样并不便于用户 删除修改 这样可能还会产生用户的误操作,而且还给你代码量增加
,真不如让用户自己钩选
个人意见
找到选中的id,就OK了
foreach (RepeaterItem ri in Repeater1.Items)
{
CheckBox chk = (CheckBox)ri.FindControl("CheckBox1");
if (chk.Checked)
{
...
}
}
可以这样
//foreach (GridViewRow in gv_Information.Rows)
//{
// CheckBox ch = (CheckBox)gr.Cells[0].FindControl("CheckAll");
// if (ch.Checked == true)
// {
// //int adjustementid = Convert.ToInt32(gr.Cells[0].Text);
// //bllajust.Delete(adjustementid);
// }
//}那Repeater了?
{
int index=e.Item.ItemIndex;
if(Rpt.Item[index].FindControl("checkBox").Checked)
{
.........
}
}
http://topic.csdn.net/t/20060106/14/4501905.html
{
CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx");
if( chProTypeEx.Checked == true )
{
}
}
{
CheckBox chProTypeEx = ( CheckBox ) item.FindControl("chProTypeEx");
if( chProTypeEx.Checked == true )
{
}
}未将对象的引用设置到对象的实例