Download website source code with

This is a simple guide about how to download a websites source code with Visual Basic.

Imports System.Net
Public Class Form1
    Private Sub SearchButton_Click(sender As Object, e As EventArgs) Handles SearchButton.Click

        Dim client As WebClient = New WebClient()
        client.Headers("User-Agent") = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0"
        TextBox1.Text = client.DownloadString("")

    End Sub
End Class

This piece of code will put the source code from in a textbox called TextBox1.