I'm developing the website that can capture the html source from other website. The following is the fragment code of my web:
The above code run in Asp.net 2.0 The above code can capture the html source. However, it can not capture the html <body>from this website.
And I copy the above code to ASP.Net 1.1, It can capture the whole html source.
Why the HttpWebRequest cannot retrieve the whole html source?
("http://www.xml.org/xml/news/archives/archive.02272006.shtml")
VB.NET:
Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim myReq As HttpWebRequest = CType(WebRequest.Create("http://www.xml.org/xml/news/archives/archive.02272006.shtml"), HttpWebRequest)
Dim reader As StreamReader = New StreamReader(myReq.GetResponse.GetResponseStream())
Dim output As String = Nothing
While reader.ReadLine() <> Nothing
output += reader.ReadLine()
End While
txtOutput.Text = output
End Sub
The above code run in Asp.net 2.0 The above code can capture the html source. However, it can not capture the html <body>from this website.
And I copy the above code to ASP.Net 1.1, It can capture the whole html source.
Why the HttpWebRequest cannot retrieve the whole html source?
("http://www.xml.org/xml/news/archives/archive.02272006.shtml")