Dim FileName As String
Dim uploads As HttpFileCollection = HttpContext.Current.Request.Files
Dim FileToUpload As HttpPostedFile = uploads
If (FileToUpload.ContentLength = 0) Then
' Error Handling
Else
FileName = System.IO.Path.GetFileName(FileToUpload.FileName)
Try
FileToUpload.SaveAs(Server.MapPath("UploadedFiles/Folderเก็บไฟล์/") + FileName)
'code save ข้อมูลลง Database โดยเอาชื่อไฟล์ไปเก็บ(FileName)
Catch ex As Exception
' Error Handling
End Try
End If