View html page source
we can view the HTML source code by using the
following code.
Following code will explain how to view the html page source of
the website.
WebRequest and WebResponse do this job with the help of
StreamReader.
Name space part
Imports System.Net
Imports System.IO
Code Part
Dim inStream As StreamReader
Dim webRequest As WebRequest
Dim webresponse As WebResponse
webRequest = webRequest.Create("www.dotnetspider.com\Home.aspx")
webresponse = webRequest.GetResponse()
inStream = New StreamReader(webresponse.GetResponseStream())
TextBox1.Text = inStream.ReadToEnd()
By
Nathan