gridview添加复选框批量操作代码

上传人:宝路 文档编号:23261722 上传时间:2017-11-30 格式:DOCX 页数:3 大小:46.84KB
返回 下载 相关 举报
gridview添加复选框批量操作代码_第1页
第1页 / 共3页
gridview添加复选框批量操作代码_第2页
第2页 / 共3页
gridview添加复选框批量操作代码_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《gridview添加复选框批量操作代码》由会员分享,可在线阅读,更多相关《gridview添加复选框批量操作代码(3页珍藏版)》请在金锄头文库上搜索。

1、效果图如下Aspx 代码Js 部分function CheckAll() /点击全部选择,选取本页面全部记录/因为在Form1中找不到chkSel的CheckBox,所以只好遍历整个documentvar cked = false;cked = document.getElementById(chkSelAll).checked;for (var i = 0; i Gridview 部分全选cs 部分protected void _Del_Click(object sender, EventArgs e)bool flag = true;for (int i = 0; i mentview.R

2、ows.Count; i+)bool ischecked = (CheckBox)commentview.Rowsi.FindControl(chkSel).Checked;if (ischecked)string _comtitle = commentview.DataKeysi.Value.ToString();string sql = delete from comment where comtitle= + _comtitle + and username= + Sessionusername + ;comsql.DB.ExecuteNoReturn(sql);flag = false;if (flag)Page.ClientScript.RegisterStartupScript(this.GetType(), scriptKey, alert(提示信息没有选择数据);, true);else Response.Redirect(apply.aspx);bindcom();

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号