By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Uploading Files to a webserver

P: 19
I am using the following example code to upload a file to a weberver. I get Decleration exepected errors. Can anyone tell me how the subroutine will be defined for this code. And what are the bugs in it?

Thanks


Public Class Form1


Dim upload As New Chilkat.Upload()

' Specify the page (ASP, ASP.NET, Perl, Python, Ruby, CGI, etc)
' that will process the HTTP Upload.
upload.Hostname = "www.freeaspupload.net"
upload.Path = "/freeaspupload/testUpload.asp"

' Add one or more files to be uploaded.
upload.AddFileReference("file1","test.csv")

' Do the upload. The method returns when the upload
' is completed.
' This component also includes asynchronous upload capability,
' which is demonstrated in another example.
Dim success As Boolean
success = upload.BlockingUpload()
If (success <> true) Then
MsgBox(upload.LastErrorText)
Else
MsgBox("Files uploaded!")
End If
End Class
May 8 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.