HTML into a Variable

Vb Gangsta

Active member
Joined
Aug 31, 2003
Messages
27
This is a pretty straight forward Question. I have a variable with a link in it. The varialble is url . Now I need to get all the html from that site and put it into a varaible called sData2 . Thanks
 
Use the WebClient class and its DownloadData method to retrieve HTML from a website.
 
Code:
Dim webc As New System.Net.WebClient new WebClient
Dim b() As Byte = webc.DownloadData("webste address") download the data to a byte array
dim html As String = System.Text.ASCIIEncoding.ASCII.GetString(b) decode the bytes into a string
:)
 
thats almost what i need except when i use the web client class i am never logged in at this website so is there a way i can use AxWebBrowser1 instead because i know that works. THanks
 
Back
Top