来看看我的代码。。为什么不能一次删除多项 myConnection.Open()放到for each上面。相同Connection只能打开一次 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果myConnection.Open()放到for each上面,那么myConnection.Close()需要放在next下面,但是刚刚试过结果还是一样。我想这个应该不是问题所在 中断检查一下DLCustmer.DataKeys(CheckBoxItem.ItemIndex)每次的值for( int i = 0; i < ListDataGrid.Items.Count; i++ ){ CheckBox chk = ( CheckBox )ListDataGrid.Items[i].FindControl("CheckID"); StringBuilder CheckedID = new StringBuilder(); if( chk.Checked ) { string strSql = "DELETE FROM tzgg WHERE tzgg_id='"+ ListDataGrid.DataKeys[ListDataGrid.Items[i].ItemIndex].ToString() +"'"; conn.ExecuteSql( strSql ); CountDel++; }} 弹出窗口类似confirm,但要好看的 svn的问题 SqlException,INSERT失败 ASP.NET按钮失效的问题 js 问题 grideview 中的checkBox 刚下的《ASP.NET信息管理系统开发实例导航(光盘)》 [Help]菜鸟问题:Asp.net C# 对Access数据库insert 时出错误! 服务器端代码能出发客户端某个按钮事件吗??在线等答案!!!!!!!!! 刚刚开始学习ASP.net不知各位高手有没有好书推荐 请问一个dropdownlist项的顺序问题。 .net中如何进行AD验证 请教:工具箱的数据(data)选项卡怎么加?
{
CheckBox chk = ( CheckBox )ListDataGrid.Items[i].FindControl("CheckID");
StringBuilder CheckedID = new StringBuilder();
if( chk.Checked )
{
string strSql = "DELETE FROM tzgg WHERE tzgg_id='"+ ListDataGrid.DataKeys[ListDataGrid.Items[i].ItemIndex].ToString() +"'";
conn.ExecuteSql( strSql );
CountDel++;
}
}