I am trying to read few number from internet .txt file and show it in text box, but without result...
These systems are imported:
Imports System.IO
Imports System.Text
Imports System.Net
Here is the code of reading file:
Dim address As String = "http://www.url.com/text.txt"
Dim client As WebClient = New WebClient()
Dim reply As String = client.DownloadString(address)
TextBox2.Text = reply
Try this instead:
Dim address As String = "http://www.stackoverflow.com"
Dim client As WebClient = New WebClient()
Dim reader As StreamReader = New StreamReader(client.OpenRead(address))
Textbox2.Text = reader.ReadToEnd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With