So I got a email asking how to do this, I haven't done this before so went through some Google searches and found how to do this. It was pretty easy. I'll just share the code here maybe it'll be useful for someone.
You need these namespaces :
Event :
You need these namespaces :
Imports System.IO Imports System.Net
Event :
Dim TXT As String = "http://www.ultimateprogrammingtutorials.info/robots.txt" Dim WC As WebClient = New WebClient() Dim Read As StreamReader = New StreamReader(WC.OpenRead(TXT)) Dim STR As String = Read.ReadToEnd TextBox1.Text = STR
- Replace the TXT string value with your .txt link.
- You can also write into a richtextbox or whatever you want(I used textbox1 for example)
1 comments:
VB.Net
ReplyIntroduction
Why VB .NET?
What Is VB .NET?
What Can You Do with VB .NET?
Variables and Data Types
Variables
Declaring Variables and Constants
Data Types
Arrays
Object Variables and Their Binding
The Collection Object
Parameters and Arguments
Introduction to Object-Oriented Programming
Why Learn Object-Oriented Techniques?
Principles of Object-Oriented Programming
Classes and Objects
Inheritance
Interfaces, Abstract Members, and Classes
Polymorphism and Overloading
Post a Comment
Note: Only a member of this blog may post a comment.