|
-
Jul 23rd, 2003, 05:47 AM
#1
Thread Starter
Fanatic Member
webclient
Hi everyone.
My webclient code works fine for downloading a single file from a website.
But now I would like to download two or as many as there are files on the website. This gives an error as follows, although it still downloads the second file too.?:
The error is: An unhandled exception of type 'system.net.webexception occured in system.dll'
'Additional information: The remote server returned an error (404) not found'
Thank you
-
Jul 23rd, 2003, 06:54 AM
#2
i answered on the dotnet forum , but here ya go :
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim client(1) As Net.WebClient
Dim strUrls() As String = {"http://www.dotnetforums.net/images/blue/on.gif", "http://www.dotnetforums.net/images/smilies/mad.gif"}
Dim strPath() As String = {"D:\im1.gif", "D:\im2.gif"}
Dim x As Integer
For x = 0 To 1
client(x) = New Net.WebClient()
client(x).DownloadFile(strUrls(x), strPath(x))
client(x).Dispose()
Next
End Sub
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Jul 23rd, 2003, 12:58 PM
#3
Thread Starter
Fanatic Member
is ftp better than using webclient?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|