August 19, 2011

Get the Hyper Text Markup Language (HTML) source code of a web page using Visual Basic .NET

Imports System.Net

Public Function GetHtmlSourceCode(ByVal address As String) As String
    Dim webClient As WebClient = New WebClient()
    Return webClient.DownloadString(address)
End Function


You can use the DownloadString method to get data from a web page by downloading and parsing its source code.

No comments:

Post a Comment