Torna al Thread
For i As Integer = 0 To FileList.Rows.Count - 1
Dim str7 As String = FileList.Rows(i).Cells(1).Text
str7 = System.Net.WebUtility.HtmlDecode(str7)
Dim cbb As CheckBox
cbb = DirectCast(FileList.Rows(i).Cells(0).FindControl("RowLevelCheckBox"), CheckBox)
If cbb.Checked = True Then
alist.Add(i)
Dim FilesDeleted As Boolean = False
Dim MyFileInfo As New FileInfo(Server.MapPath("~/File/") + str7)
If MyFileInfo.Exists = True Then
MyFileInfo.Delete()
FilesDeleted = True
ClientScript.RegisterStartupScript(Me.GetType(), "AlertScript", "alert('File eliminati.');", True)
End If
Else
ClientScript.RegisterStartupScript(Me.GetType(), "AlertScript", "alert('Seleziona file da eliminare.');", True)
Exit For
End If
Next
BindGrid()