The My.Computer.Network.UploadFile Method can be used to upload a file and store it to a remote location. If the ShowUI parameter is set to True, a dialog box is displayed that shows the progress of the download and allows users to cancel the operation.
Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI (Uniform Resource Identifier).This example uploads the file Order.txt to http://www.cohowinery.com/uploads.aspx.
My.Computer.Network.UploadFile( _ "C:\My Documents\Order.txt", _ "http://www.cohowinery.com/upload.aspx")
Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI. This example uploads the file Order.txt to http://www.cohowinery.com/uploads.aspx without supplying a user name or password, shows the progress of the upload, and has a time-out interval of 500 milliseconds.
My.Computer.Network.UploadFile( _ "C:\My Documents\Order.txt", _ "http://www.cohowinery.com/upload.aspx", "", "", True, 500)
Use the UploadFile method to upload a file, specifying the source file's location and the target directory location as a string or URI, and specifying the user name and the password. This example uploads the file Order.txt to http://www.cohowinery.com/uploads.aspx, supplying the user name anonymous and a blank password.
My.Computer.Network.UploadFile( _ "C:\My Documents\Order.txt", _ "http://www.cohowinery.com/upload.aspx", "anonymous", "")
The following conditions may throw an exception:
The local file path is not valid (ArgumentException).
Authentication failed (SecurityException).
The connection timed out (TimeoutException).
I don't think this instruction is clear about the destination of the uploading.
It seems it has to be a file, but what type of file? must it be an aspx file? if so, any code required in the aspx?
And will the source file be uploaded into the folder where the aspx file is? it's not clear.
Would be helpful if there is a detailed example.