protected void grd_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
con.Open();
string query = "delete from details where sno='"+grd.DataKeys[e.RowIndex].Value+"'";-----(getting error like Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index)
SqlCommand cmd = new SqlCommand(query,con);
cmd.ExecuteNonQuery();
filldata();
con.Close();
}
像索引gettnig错误超出范围。必须大于收集在网格视图行删除
你的问题是什么? – Izzy 2014-10-22 10:35:26