i decided to make a download program,
i have a form 2 textboxs n a button, i looks somin like this

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
My.Computer.Network.DownloadFile((TextBox1.Text), (TextBox2.Text))
End Sub

it aint workin cos of
` A valid address should include a protocol, a path and a file name.`

and yes the address is correct how the @'!? do u get it to work

debasisdas commented: @'!? -3
Re: download 80 80

My.Computer.Network.DownloadFile(Address as string, DestinationFileName as string)

Read up and make sure you're assembling the strings properly if this is how you are constructing the statement.



Note how in this example they include a protocol, path, and file name.

My.Computer.Network.DownloadFile _
("http://www.cohowinery.com/downloads/WineList.txt", _
"C:\Documents and Settings\All Users\Documents\WineList.txt")

Re: download 80 80

you should change the code to this: it should make it work:

My.Computer.Network.DownloadFile(textbox1.text, "C:\where the file will save to, the C:\ has to be there for it to work")
            Process.Start("C:\same location as where the file will download to, this starts the program after it downloads")

hope that helped you, im also somewhat of a noob when it comes to VB but try that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.