本文介绍了Gridview行删除错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
  {

int ipimg = (int)GridView1.DataKeys[e.RowIndex].Value;
 objcmd = new SqlCommand("DELETE FROM TBL_PDT_IMG WHERE IMG_ID='" + ipimg + "'", con);
objcmd.ExecuteNonQuery();
  bind();
}










i have error on delete Rows.

that Error is <pre lang="sql">Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index





我在说什么?请帮帮我



what i am say? please help me

推荐答案



这篇关于Gridview行删除错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 00:35