Hi,
I am using VB2005
Can I read from my program a text file from a web site without to download the text file?
Thanks in advance
Printable View
Hi,
I am using VB2005
Can I read from my program a text file from a web site without to download the text file?
Thanks in advance
You have to download the information the text file contains, but you don't have to save the file locally. The WebClient.DownloadString method will download the the contents of the file directly into a String object.
Hi,
Thanks for your ReplyCode:Dim url As String = "http://website/test.txt"
Dim sampleClient As New Net.WebClient()
Dim content As String = sampleClient.DownloadString(url)
TextBox1.Text = content
How do i use it in VB2003
Dim content As String = sampleClient.DownloadString(url)
gives me a error
john