for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox c = (CheckBox)GridView1.Rows[i].FindControl("chkSelect");
if (c.Checked)
{
cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "delete from inbox where mail_id='" + GridView1.Rows[i].Cells[1].Text + "'";
con.Open();
cmd.ExecuteNonQuery();
con.Close();
BindData();
}
}
Subscribe to:
Post Comments (Atom)

2 comments:
gr8!! it's help a lot.
Thanks
Post a Comment