如何在VB .Net中使用Web客户端

时间:2014-03-30 17:57:10

标签: vb.net webclient

Greatings,我有一段代码,我在VB中执行代码时遇到错误。错误说“'Captcha'没有被宣布。” 。 Enyone?## Heading ##


代码:

With New Net.WebClient
    Try
        Dim b() As Byte = .UploadFile(New System.Uri("127.0.0.1"), Captcha.Path)
        Captcha.Solution = System.Text.Encoding.ASCII.GetString(b).Split(CChar("|"))(5).ToString
    Catch ex As Exception
        Result.FailMessage = "Could not retrieve captcha response; " & ex.Message
        Exit Try
    End Try
End With

0 个答案:

没有答案