在每条记录后有个,按钮,点击按钮的时候得到这条记录的id,id是GridView的DataKeyName。
怎么得到呢?
怎么得到呢?
解决方案 »
- 跪求....string类型的数组如何删除指定的位数????
- 关于ASP.NET国际化的问题,怎么让用户选择语言类型
- 请问如何用Enterprise Library 1.1 连接Sql Server 2005?
- 求ASP.NET/C#写的论坛、留言板、blog的学习用源代码
- 如何在一个页面上添加多个纪录然后同时提交?(菜鸟问题)
- 一个类的问题,求教...
- 高分提问:.net操作Word:我做了一个Word模板,我想实现这样的功能,在数据库去数据然后,替换word摸班的内容,保存为临时文件,在IE中打
- 如何实现对treeview的二次递归
- 一个Remoting的例子
- datagrid的取图问题!答对者有分!!!!!!!!!!!!!!!!
- 如何在单击按钮进行页面跳转前弹出确认提示框?
- 关于.net中弹出confirm对话框问题 - 在线
{
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox ck = (CheckBox)row.FindControl("CheckBox");
if (ck.Checked)
{
strid = GridView1.DataKeys[row.RowIndex].Value.ToString();
}
string sql = "delete from cwpayi where id='" + strid + "'";
SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["connectionString"]);
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Open();
//cmd.ExecuteNonQuery();
cmd.Dispose();
conn.Close();
}
//从定向到页面。
Response.Write("<script language='javascript'>window.parent.mainFrame.location.href='feeDetail.aspx';</script>");
}
string ss = dk.Value.ToString();