Delete Code is Here |
|
Posted By
Moderator1
on
6/20/2008 8:46:00 PM |
|
|
|
Description: |
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("cb");
if (cb .Checked )
{
string sql="Delete from yourtable where id='"& row.cells[0].Text &"'";
SqlCommand cmd=new SqlCommand(sql,connobject);
cmd.ExecuteNonQuery();
}
}
this above code inside the block is only a sample code to guide you. Same like that you do the real one.
Thanks. |
|
|
|