Torna al Thread
Dim I As Integer, FilesDeleted As Boolean = False
For I = 0 To FileList.Rows.Count - 1
Dim cb As CheckBox = DirectCast(FileList.Rows(I).Cells(0).FindControl("RowLevelCheckBox"), CheckBox)
If cb.Checked Then
'Do the deletion here
Dim MyFileInfo As New FileInfo(Server.MapPath("~/File/") + FileList.Rows(I).Cells(1).Text)
If MyFileInfo.Exists = True Then
ClientScript.RegisterStartupScript(Me.GetType(), "AlertScript", "alert('File esiste.');", True)
MyFileInfo.Delete()
FilesDeleted = True
Else
ClientScript.RegisterStartupScript(Me.GetType(), "AlertScript", "alert('File non esiste.');", True)
End If
End If
Next