Internet Transfer Control in Dot Net???

G

gwhite1

I used to be able to easily transfer a file or web page off of a web
site to a flat file with the VB6 internet transfer control.

Does anyone know how to do this in Dot.NET 2005 VB? VB6 was so easy.

Thanks!!

Sheila
 
M

Michel Posseth [MCP]

Well it is still easy but totally different as in VB6


in .Net you can create a webclient like this
<imports>
Imports System
Imports System.IO
Imports System.Net

<Code>
Dim URI As String = "http://www.google.com"

Dim wbClient As new WebClient
Dim strData As Stream = client.OpenRead(URL)
Dim sr As StreamReader = New StreamReader(data)


see the overloads for more options ( like sending data as a post etc )

regards


Michel Posseth [MCP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top