Torna al Thread

Private alist As New ArrayList() For i As Integer = 0 To FileList.Rows.Count - 1 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/") + 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
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5