How do you login to a webpage and retrieve its content in C#?

前端 未结 7 2036
孤街浪徒
孤街浪徒 2020-12-30 17:13

How do you login to a webpage and retrieve its content in C#?

7条回答
  •  暖寄归人
    2020-12-30 17:53

    Use the WebClient class.

    Dim Html As String
    
    Using Client As New System.Net.WebClient()
        Html = Client.DownloadString("http://www.google.com")
    End Using
    

提交回复
热议问题