Dim sSavePath As String Dim strMessage As String Dim sFile As HttpPostedFile Dim strFileName As String Dim iCtr As Integer sSavePath = Request("save_path") For iCtr = 0 To Request.Files.Count - 1 sFile = Request.Files(iCtr) If (iCtr Mod 2) Then Response.Write("") Else Response.Write("") End If Response.Write("" & sFile.FileName & " ") Response.Write("" & sFile.ContentLength & " ") If sFile.FileName <> "" Then strFileName = sFile.FileName strFileName = strFileName.Substring(strFileName.LastIndexOf("\") + 1) Try sFile.SaveAs(sSavePath & strFileName) strMessage &= "Uploaded: " & sSavePath & strFileName & "
" Catch Ex As Exception strMessage &= "Failed uploading " & strFileName & ": " & Ex.ToString() & "
" Response.Write("" & strMessage & "") End Try End if Next