2010-03-05 48 views
1

不知道如何做到这一点,这里是我的代码vb.net值转换为字符串

Dim oWeb As New System.Net.WebClient() 

    oWeb.Headers.Add("Content-Type", "application/x-www-form-urlencoded") 

    Dim bytArguments As Byte() = System.Text.Encoding.ASCII.GetBytes("username=username&password=password") 
    Dim bytRetData As Byte() = oWeb.UploadData("https://www.website.com", "POST", bytArguments) 
    MsgBox(oWeb.ResponseHeaders.GetValues(2)) 

林试图获得保存,然后饼干使用它的另一篇文章中的数据我想这样做,但我一直以1秒的时间注销。

该错误是

Argument 'Prompt' cannot be converted to type 'String'. 

消息框

回答

1

的问题是,所述GetValues返回字符串数组,它在MessageBox具有显示的麻烦。

当我改变行

MsgBox(String.Join(",", oWeb.ResponseHeaders.GetValues(2))) 

它的工作原理,所以你需要决定你希望如何串联正被返回的字符串数组。