I have a grid in which multiple delete is to be implemented but before deletion it should show confrmation box which will ask to delete or not.
But this confirmation bo must be an ajax modal popup extender confirmation box not javascript.
My code for multiple delete:
protected void annDelete_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("chk_delete");
if (cb.Checked && cb != null)
{
{
modalconfirmbox.show();
int ID_No = Convert.ToInt32(GridView1.DataKeys[row.RowIndex].Value);
//code to delete where id =ID_No and bindgrid
}
}
}
}
this delete code is working and confirmation is appering. but you click yes or no or click none in modalconfirm rows will be deleted.
how can i fix this?