Traditional Culture Encyclopedia - Almanac inquiry - How to use VB.NET to get web page source code?

How to use VB.NET to get web page source code?

Mark the url as String =“URL "

Dim resources establish persistent connections.

Set the reader to StreamReader = _

Create a new StreamReader(http presp. GetResponseStream,

System. text . encoding . get encoding(-0))

Dimreshtml as string = reader.readtoend ()' reshtml is the source code of the web page.