I am using the following code:
The problem is that I want to display an error message for any of the 5 possible uploaded files by changing the lblUploadError1.Text thru lblUplaodError5.Text
So somehow I need to associate the f.GetName with each of the files that were uploaded.
Any suggestions?
Thanks,
Joe
For Each f As UploadedFile In RadUpload1.UploadedFiles | |
Dim targetFolder As String = Session("UserDir") | |
Dim targetFileName As String = System.IO.Path.Combine(targetFolder, f.GetName) | |
If System.IO.File.Exists(targetFileName) Then | |
'Sets error label to visable and displays message. | |
lblUploadError1.Visible = True | |
lblUploadError1.Text = "File name " & f.GetName & " already exists!" | |
Else | |
'Save uploaded file(s) info to database | |
End Using |
|
End IF Next |
The problem is that I want to display an error message for any of the 5 possible uploaded files by changing the lblUploadError1.Text thru lblUplaodError5.Text
So somehow I need to associate the f.GetName with each of the files that were uploaded.
Any suggestions?
Thanks,
Joe