1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Protected Sub BtnEnvoyer_Click(sender As Object, e As EventArgs) Handles BtnEnvoyer.Click
Dim fileExt As String
fileExt = System.IO.Path.GetExtension(FileUploadDoocuments.FileName)
Dim PathFileDiocuments As String = Request.PhysicalApplicationPath + "documents\"
'Uniquement les fichiers de type pdf
If fileExt = ".pdf" Then
Try
FileUploadDoocuments.PostedFile.SaveAs(PathFileDiocuments + FileUploadDoocuments.FileName)
Label1.Text = "Le fichier a été Uploader sous le nom de : " + FileUploadDoocuments.FileName
Catch
End Try
End If
End Sub |
Partager