I am using check box to delete the selected files,here is code im using..
if i select the check box the selected file s deleting...
if i have not selected any checkbox and click the delete button it must show a message...(select file to delete) help me in doing this..
protected void delete_img_Click(object sender, ImageClickEventArgs e)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox cb = (CheckBox)GridView1.Rows[i].Cells[0].FindControl("ShowAddress");
if (cb != null)
{
if (cb.Checked)
{
string row_id = GridView1.DataKeys[i].Value.ToString();
delete_document(row_id);
}
}
}
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Selecte Files deleted successfully!!!'); window.location.href = 'Edit.aspx';", true);
}