Author: greatbrandini | Posted on: 12/3/2008 3:11:17 PM | Views : 472

Okay, so I have a web app here in the office that allows people to submit requests to a team.  Most of the time, that requires also attaching a file or files to a request.  I have a couple of upload controls on the page so they can browse to their file and then I have code that uploads it to the local network server.

Here's the code:

 1 Dim filefolder As New IO.DirectoryInfo(filepath)
2 If filefolder.Exists = False Then
3 IO.Directory.CreateDirectory(filepath)
4 End If
5
6 Dim uploads As HttpFileCollection = HttpContext.Current.Request.Files
7
8 Go to the complete details ...